CCS811 library ?
-
Hello, is someone had developped a library for the CCS811 (CO2/TVOC chip) ?
I'm trying to adapt an raspi lib from Sparkfun exemple, but I'm loosed with the I2C readfrom_mem() and Writeto_mem()
Thanks for help!
Jiemde -
There is Circuit Python driver for CCS811 :
https://github.com/adafruit/Adafruit_CircuitPython_CCS811
It has I2C init differences from MicroPython, but it should not be difficult to convert this driver to (Pycom) MicroPython. -
Hi @rcolistete, Thanks for your answer, but I already use this lib for inspiration and not only I2C init differences.
for example:
setting = i2c.readfrom_mem(device, CSS811_MEAS_MODE, 1) give me a result like this: b'\xfd'
setting = ~(0b00000111 << 4 ) must be 10001111 = 143 as result but the result is -113 causing by the first 1
and I also have an " typeError: unsupported types for : 'bytes', 'str'
Jiemde -
@jiemde did you get the CCS811 to work? Looks like an interesting sensor with both eCO2 and VOCs.
-
Hi @ledbelly2142 Happy New year 2018 !
Yes it work ! find the class at https://gist.github.com/jiemde/481161c426c90c73e52aa51acfd94c2b and a testing Wipy with differents sensors at https://thingspeak.com/channels/77198
Best regards, Jiemde -
@jiemde Thanks! I forked it.
Cheers!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login