from machine import ADC
import time
#Lecturas min y max del sensor
Hmin=41200
Hmax=65535
while True:
Lectura = ADC(28).read_u16()
#Ecuación que describe la humedad porcentual
humedad=100*(Hmax-Lectura)/(Hmax-Hmin)
print("Humedad: {0:.2f}".format(humedad))
time.sleep_ms(200)
from machine import Pin
import time
led=Pin(16,Pin.OUT)
while True:
led.value(1)
time.sleep(1)
led.value(0)
time.sleep(1)