micropython-examples/dht11/dht11.py

7 lines
112 B
Python

import dht
import machine
d = dht.DHT11(machine.Pin(16))
d.measure()
print(d.temperature())
print(d.humidity())