from machine import ADC,PWM,Pin
from time import sleep
a=ADC(28)
led=PWM(Pin(0))
led.freq(100)
while(1):
    led.duty_u16(a.read_u16())
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT