This package adds functionality to the CCS811 board. Based in the work of ADataDate
- The CCS811 Air Quality Sensor can be directly mated to the matching pins (I2C) of the SAMD21 system.
- I2C is set up so the user needs to start the device, then read the data.
- The CCS811 sensor takes 20 minutes to burn-in or get meaningful data.
- The TVOCs are presented as number between 0ppb to 1187ppb.
- The eCO2 (equivalent CO2) is presented as a number between 400ppm to 8192ppm.
- -- I2C - SCL
- -- I2C - SDA
The CCS811 air quality sensors communicates via I2C. The data returned as a number can be stored in a variable, displayed on the 5x5 LED Matrix or sent serially to OpenLog.
|Read eCO2|
block reads the equivalent CO2 and can be any number between 400ppm and 8182ppm.|Read TVOCs|
block reads the total organic volatile compounds and can be any number between 0ppb to 1187ppb.|Device Error|
block is used while troubleshooting otherwise don't use it. It will return a number corresponding to a specific error on the CCS811.|Device Status|
block is used while troubleshooting otherwise don't use it.|HWID|
block is used to test the most basic read on the I2C line. Use if you are having probelms establishing communication.
The following project will read the eCO2 and TVOCs data.
let eCO2 = 0
let TVOCs = 0
loop.forever(() => {
TVOCs = airQuality.readTvoc()
eCO2 = airQuality.readCo2()
loop.pause(1000)
})
Electronic Cats invests time and resources providing this open source design, please support Electronic Cats and open-source hardware by purchasing products from Electronic Cats!
MIT
- for PXT/maker
airQuality