Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese module, I2C error #27

Closed
esp13 opened this issue Sep 9, 2019 · 5 comments
Closed

Chinese module, I2C error #27

esp13 opened this issue Sep 9, 2019 · 5 comments

Comments

@esp13
Copy link

esp13 commented Sep 9, 2019

Hi,

I found the firmware section in datasheet and was wondering if I already had the last one. So I founded your library.

But unfortunately like https://github.com/maarten-pennings/CCS811/issues/6 and https://github.com/maarten-pennings/CCS811/issues/7 I can't get your library working.

I can successfully use adafruit or sparkfun library ones. I don't touch wiring, just upload your code, and get this "I2C error":

setup: Starting CCS811 basic demo
setup: ccs811 lib  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: CCS811 start FAILED
CCS811: I2C error
CCS811: I2C error
CCS811: I2C error
CCS811: I2C error

I tried with and without setting I2C SDA/SCL pins (21,22)
I tried with and without ccs811.set_i2cdelay(50);
I tried with and without an WAK pin (17 / -1)
I tried with an without an I2C address set (0x5A)

I am on a ESP32 with a Chinese CSS811 module like https://raw.githubusercontent.com/maarten-pennings/CCS811/master/wire-ccs811only.jpg
I don't add resistors for pull-up.

Oh and something weird: after flashing your library, if I flash again the adafruit one that was working for me just before, I had to do some reset of the chip first or it won't be recognized.

Sorry for my poor English, hope this information help.

@maarten-pennings
Copy link
Owner

Hmm
You tried a lot already.

The Arduino library for ESP32 version 1.0.0 has an i2c bug: it does not support repeated start conditions. This seems to be fixed in release 1.0.1. Which one are you using?

@esp13
Copy link
Author

esp13 commented Sep 9, 2019

Thank you for your answer

I was on 1.0.0 ...
I just upgraded to 1.0.2, but still the same :/

@esp13
Copy link
Author

esp13 commented Sep 9, 2019

Wait!
I tried to test again all combinations, and this one seems working:

CCS811 ccs811(-1);
Wire.begin(21,22); 
//ccs811.set_i2cdelay(50);

I do some tests more.
Edit: wow, now all combinations are working... don't understand!

@esp13
Copy link
Author

esp13 commented Sep 9, 2019

I get this:

setup: Starting CCS811 basic demo
setup: ccs811 lib  version: 10
setup: hardware    version: 12
setup: bootloader  version: 1000
setup: application version: 1100

So I should upgrade my CSS811 firmware

@esp13
Copy link
Author

esp13 commented Sep 9, 2019

Starting CCS811 flasher
setup: library     version: 10
setup: hardware    version: 12
setup: bootloader  version: 1000
setup: application version: 2000
init: already has 2.0.0

Done!
Thank you much for your library, repository and help :)

@esp13 esp13 closed this as completed Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants