- Mon Nov 11, 2019 9:17 pm
The current Arduino ESP I2C library (v2.6.0 via Board Manager) DOES support clock stretching on any bits; I've tested that pretty thoroughly before they released 2.6.0. I don't know offhand what the stretch requirements are for your RFID part, but you can set the stretch UP from it's default 230us to around 5ms before you start to have problems. If you go over ~25ms the WiFi may disconnect. There's a fix in the works for that, but it's not out yet.
To change the stretch limit, add
Wire.setClockStretchLimit(time in microseconds);
immediately after the Wire.begin(); statement.
edit: I just looked up your part: max clock stretch on page 211 is 1ms, so that 'time in microseconds' above is 1000
You won't have to worry about the 25ms problem, as you're only stretching 1/25th of that pre-2.6.0 limit. With the current (as of a few days ago) ESP8266 library, Adafruit can happily include I2C support if they so choose.
Last edited by StanJ on Thu Jan 30, 2020 7:11 am, edited 1 time in total.