# import time
# time.sleep(0.1) # Wait for USB to become ready
# print("Hello, Pi Pico W!")
from machine import ADC, Pin, PWM
import time
pot = ADC(Pin(26)) #GP26 = ADC0
led = PWM(Pin(15)) #LED + 220옴 저항
led.freq(1000)
while True:
value = pot.read_u16() #0 ~ 65535
led.duty_u16(value) #그대로 밝기로 전달
time.sleep(0.02)
#피코 GND는 GND1 GND2 GND3 등 어디든 가능함
#SIG는 26이나 27번에 꽂기