So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By davydnorris
#78857 One thing with the CCS811 is that it makes use of I2C clock stretching.

I am pretty sure the I2C driver in the ESP8266 Arduino port does not support clock stretch, but it's worth checking if you still have problems with your code. That may have locked up the I2C bus waiting for a response and the WDT tripped.
User avatar
By schufti
#78869 i2c clock stretching is supported for 3years, even takes care about 80/160MHz cpu clock.
But most likely only for a certain amount because of watchdog ...
User avatar
By QuickFix
#78873 I really shouldn't be doing this, since TS is probably not able to even compile a simple blink sketch yet, but...

Having had a small look at the library itself (which apparently is only written for the Arduino and not the ESP via ifdefs).
  • At what GPIO-pins is the sensor connected?
    The library assumes default I2C pins SDA and SCL (UNO: A4/A5, Mega & DUE: 20/21, Leonardo: 2/3), but the ESP doesn't have hardware I2C, so what GPIO-pins is TS using and where did he configure that?
  • Also by default (the sketch starts the class with an empty ".begin()") the library assumes an I2C address of 0x5A for the sensor: is this correct for the attached sensor or are you actually using a Adafruit board?
In my opinion it's not possible to use this library for the ESP, without making changes to the library itself.

@Rerode: please have a look at this library and examples from Maarten Pennings, I'm sure you'll have much more luck with that library instead. :idea: