from machine import ADC, Pin
import utime
#objeto
adc = ADC(0)
led1= Pin(18, Pin.OUT)
led2= Pin(19, Pin.OUT)
led3= Pin(20, Pin.OUT)
led4= Pin(21, Pin.OUT)
gp = [led1, led2, led3, led4]
while True:
for k in gp:
tiempo= 50 + int(adc.read_u16()/327)
k.value(1)
print(tiempo)
utime.sleep_ms(tiempo)
k.value(0)
utime.sleep_ms(tiempo)