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
-
@jiemde Thanks! I forked it.
Cheers!
-
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 did you get the CCS811 to work? Looks like an interesting sensor with both eCO2 and VOCs.
-
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
-
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.