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)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT
pico:GP0
pico:GP1
pico:GND.1
pico:GP2
pico:GP3
pico:GP4
pico:GP5
pico:GND.2
pico:GP6
pico:GP7
pico:GP8
pico:GP9
pico:GND.3
pico:GP10
pico:GP11
pico:GP12
pico:GP13
pico:GND.4
pico:GP14
pico:GP15
pico:GP16
pico:GP17
pico:GND.5
pico:GP18
pico:GP19
pico:GP20
pico:GP21
pico:GND.6
pico:GP22
pico:RUN
pico:GP26
pico:GP27
pico:GND.7
pico:GP28
pico:ADC_VREF
pico:3V3
pico:3V3_EN
pico:GND.8
pico:VSYS
pico:VBUS
led1:A
led1:C
led2:A
led2:C
led3:A
led3:C
led4:A
led4:C
r1:1
r1:2
r2:1
r2:2
r3:1
r3:2
r4:1
r4:2
led5:A
led5:C
led6:A
led6:C
led7:A
led7:C
led8:A
led8:C
r5:1
r5:2
r6:1
r6:2
r7:1
r7:2
r8:1
r8:2
pot1:GND
pot1:SIG
pot1:VCC