Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (13 sloc) 326 Bytes
import time
import board
import busio
import adafruit_ccs811
i2c = busio.I2C(board.SCL, board.SDA)
ccs811 = adafruit_ccs811.CCS811(i2c)
# Wait for the sensor to be ready
while not ccs811.data_ready:
while True:
print("CO2: {} PPM, TVOC: {} PPB"
.format(ccs811.eco2, ccs811.tvoc))
You can’t perform that action at this time.