import time
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
from machine import ADC,Pin,PWM
pot=ADC(Pin(26))
led=PWM(Pin(0),freq=2000)
while 1:
val=pot.read_u16()
print("adc value:",val)
led.duty_u16(val)
time.sleep(0.4)