import time
from machine import Pin,ADC,PWM
time.sleep(0.1) # Wait for USB to become ready
SW = Pin(28,Pin.IN,Pin.PULL_UP)
LED = PWM(Pin(22), freq=1000)
VR = ADC(26)
while 1 :
LED.duty_u16(VR.read_u16())
time.sleep(0.1)
import time
from machine import Pin,ADC,PWM
time.sleep(0.1) # Wait for USB to become ready
SW = Pin(28,Pin.IN,Pin.PULL_UP)
LED = PWM(Pin(22), freq=1000)
VR = ADC(26)
while 1 :
LED.duty_u16(VR.read_u16())
time.sleep(0.1)