Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import dht
- from time import sleep
- import machine
- d = dht.DHT22(machine.Pin(14))
- while True:
- d.measure()
- print('T={} H={}'.format(d.temperature(),d.humidity())) # eg. 23.6 (°C)
- sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement