pimoroni-pico/micropython/examples/breakout_scd41/scd41_demo.py

16 wiersze
314 B
Python
Czysty Zwykły widok Historia

2021-07-23 15:37:21 +00:00
import time
import pimoroni_i2c
import breakout_scd41
i2c = pimoroni_i2c.PimoroniI2C(4, 5)
breakout_scd41.init(i2c)
breakout_scd41.start()
while True:
if breakout_scd41.ready():
co2, temperature, humidity = breakout_scd41.measure()
print(co2, temperature, humidity)
time.sleep(1.0)