import machine
import utime
potentiometer = machine.ADC(28)
led = machine.PWM(machine.Pin(15))
led.freq(1000)
while True:
    value = potentiometer.read_u16()
    print(value)
    led.duty_u16(value)
    utime.sleep_ms(200)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT