import time
from machine import Pin ,PWM ,ADC

ledr = PWM(Pin(5))
m = ADC(26)

ledr.freq(500)

while True:
    ledr.duty_u16(m.read_u16())
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT