CCS811空气质量传感器

from microbit import *
import time
import CCS811

ccs811 = CCS811()

#ccs811.write_base_line(0xd47c)

while True:
    if(ccs811.check_data_ready()):
        print("CO2:"+str(ccs811.CO2_PPM())+" ppm")
        print("TVOC:"+str(ccs811.TVOC_PPB())+" ppb")
        print("-----------------------")
#    print(str(ccs811.read_baseline()))
    time.sleep(0.5)

针对CCS811空气质量传感器,连接到I2C接口: