-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I found a number of timing issues on the ESP8266 and ESP32 where the simple examples would not work with the CCS811. These are likely related to the fact that some I2C libraries (including the ESP32) do not support clock stretching. I have not verified that this is actually the reason for the failure.
In the existing libraries there was no error checking in the interactions with the device. There were a number of device interactions that did not always work. I added retries to work around this issue. I added error checking and perform retries on errors.
After a great deal of trial and error I was able to repair the library so it would work correctly on the SparkFun ESP32 Thing, the ESP32 Dev Module and my LOGGER ESP8266 board. The repaired code attached uses delays to make the interactions work. It should replace the existing modules cleanly. Error handling and retries are performed. Error reporting and some test code is included but turned off.
Also included is an enhanced simple test .INO that does a bit more reporting. The library fixes are important this test is not.