adafruit / Adafruit_CCS811

Arduino driver for CCS811 digital gas sensor
MIT License
65 stars 36 forks source link

Add support for getting and setting the baseline #23

Closed chbw closed 3 years ago

chbw commented 3 years ago

This pull request adds support for getting/setting the sensor's baseline register.

According to Application Note AN000370 the "CCS811 calculates the eCO2 and eTVOC using the baseline as a reference point" and it won't save the baseline on it's own. Thus, when you bring up the sensor in polluted air you need to restore a baseline from a time when the sensor has been exposed to clean air. Otherwise, your readings will be wrong (based on wrong assumptions on part of the sensor). Again, see the Application Note for details.

ladyada commented 3 years ago

nice thank you!