from machine import Pin
from dht import DHT22
import time
dht = DHT22(Pin(28))
while True:
dht.measure()
temp = dht.temperature()
hum = dht.humidity()
print(f"Temperatura: {temp}°C Humedad: {hum}% ")
time.sleep(2)from machine import Pin
from dht import DHT22
import time
dht = DHT22(Pin(28))
while True:
dht.measure()
temp = dht.temperature()
hum = dht.humidity()
print(f"Temperatura: {temp}°C Humedad: {hum}% ")
time.sleep(2)