I would like to use this co2 sensor (https://learn.adafruit.com/adafruit-ccs811-air-quality-sensor/overview) , but it says it uses i2c clock stretching. It warns not to use it for the raspberry pi because the clock stretching may dramatically slow down the i2c clock speed. That being said, can the particle electron handle this sensor?
I do get readings from the sensor, but I haven’t figured out how to keep the readings from drifting considerably over time to the degree of utter guestimation.
Oh? Can you explain more? Are you talking about the co2, tvoc, or temperature readings?
Also, have you tried using their other co2 sensor?
Same experience with the CCS811 VoC sensor I had tested for many months.
The levels will drift higher and higher over time to the point you have no idea what is real or just drifted garbage readings.
The solution is to use this VoC sensor instead. It is advertised as a non drift sensor and after 5-6 months of testing it out I can say it certainly does not drift and stays stable for me.
If I remember correctly the default Adafruit library works out of the box on the Particle P1 & Photons. I have it working just fine.
You can see in the graph below that over a 30-day time frame the “Baseline” VOC & Co2 levels remain very stable. This is placed in a shop with a Laser Cutting Machine, where cleaning alcohol & glues are used regularly which cause the spikes in VOC levels you see.
Here is what a 12 hour reading looks like updated every min
Can I see your code? And are you using pins D0 and D1 on the electron? Do you have that sensor connected with any other sensors? I can get mine to work when it’s just the particle electron and the sgp30, but not when it’s with other sensors…?