print("Hello, ESP32")
from machine import Pin
from dht import DHT22
from time import sleep
led = Pin(2,Pin.OUT)
dht22= DHT22(Pin(4))
while True:
dht22.measure()
print(dht22.temperature(), 'C', dht22.humidity(), '%')
if dht22.humidity() > 50:
led.on()
else:
led.off()
sleep(2)