from machine import Pin, ADC
from utime import sleep, sleep_ms
from dht import DHT22
sensor = DHT22(Pin(4))
while True:
sensor.measure()
tm = sensor.temperature()
hm = sensor.humidity()
print("Tem: {}°C, Hum: {}%". format(tm, hm))from machine import Pin, ADC
from utime import sleep, sleep_ms
from dht import DHT22
sensor = DHT22(Pin(4))
while True:
sensor.measure()
tm = sensor.temperature()
hm = sensor.humidity()
print("Tem: {}°C, Hum: {}%". format(tm, hm))