Qwiic OpenLog and ESP32 Thing Plus - Avoid Clock Stretching?

https://learn.sparkfun.com/tutorials/qw … okup-guide

Note: The Qwiic OpenLog utilizes clock stretching, which some I2C master devices like ESP32 can’t handle. To avoid this, you may have to only send/read bytes one at a time to receive proper data.

I cannot seem to get my ESP32 to write or read data from the MicroSD Card. I have a feeling it’s because I am using the ESP32 and not an Arduino.

How would I send/read bytes one at a time in this case?

You may need to write your code as shown here:

https://stackoverflow.com/questions/613 … -at-a-time

Sending “one byte at a time” is very hard to do with an ESP32. Long ago I had the same problem with an SCD30 on ESP32. I have then taken and adjusted the Softwire from the ESP8266 library for ESP32.

I connected the Qwiic Openlog to my Sparkfun ESP32- thing and it failed due to clockstretching. I have included the Softwire and made some small adjustments to the original Qwiic version. It now worked without problems. Attached is the updated library, which also includes a new example for Qwiic-filemanager.

SparkFun_Qwiic_OpenLog_Arduino_Library-main.zip (47.4 KB)