from machine import Pin, ADC
from utime import sleep, sleep_ms
from dht import DHT22
sensor= DHT22(Pin(16))
while True:
sensor.measure()
tem = sensor.temperature()
hum = sensor.humidity()
print("Tem:{}°c, Hum:{}%".format(tem,hum))
sleep_ms(400)