from machine import Pin,ADC
from utime import sleep
min_time=0.5
max_time=2.5
sleep(0.1)
pot=ADC(Pin(28))
led=(Pin(3,Pin.OUT),Pin(4,Pin.OUT),Pin(5,Pin.OUT),
Pin(6,Pin.OUT),Pin(7,Pin.OUT),Pin(8,Pin.OUT),
Pin(9,Pin.OUT),Pin(10,Pin.OUT))
while 1:
val=pot.read_u16()
delay=val/65535*(max_time-min_time)+min_time
print(delay)
for i in led:
i.value(not(i.value()))
sleep(delay)