maarten-pennings / CCS811

Arduino library for the CCS811 gas sensor for monitoring indoor air quality.
MIT License
167 stars 47 forks source link

ESP32 ERRO I2C #60

Closed juka-lp closed 3 years ago

juka-lp commented 3 years ago

I'm having a problem with the ccs811, and for days I can't find the reason. When I run CCS811 Basic, I get the error "CCS811: I2C error" And even if I try to update the firmware, I get the error:

Starting CCS811 flasher setup: library version: 10 ccs811: ping failed (VDD / GND connected? SDA / SCL connected?) setup: CCS811 begin FAILED setup: hardware version: FFFFFFFF setup: bootloader version: FFFFFFFF setup: application version: FFFFFFFF setup: starting flash of 'CCS811_FW_App_v2-0-0.bin' in 5 seconds

I've tried everything, even signaling the pin on Wire, does anyone have any idea what to do?

maarten-pennings commented 3 years ago

Hi, the line

ccs811: ping failed (VDD / GND connected? SDA / SCL connected?)

is important. It is the very first time the library tries to communicate with the ccs811. The communication is the lightest possible, a ping. And that fails.

This means you have a hardware problem:

Flashing a new firmware is useless, you first need to establish communication.

juka-lp commented 3 years ago

The pins are connected in the right place, one of the times I tried everything went right, but out of nowhere it went back to this error forever. I run an i2c scanner, and the i2c address appears, 0x16 is the most frequent