from machine import Pin,ADC,PWM
from utime import sleep
controller=ADC(Pin(28))
led=PWM(Pin(15))
led.freq(1000)
while True:
duty=round(controller.read_u16())
print(duty)
led.duty_u16(duty)
print("ON")
from machine import Pin,ADC,PWM
from utime import sleep
controller=ADC(Pin(28))
led=PWM(Pin(15))
led.freq(1000)
while True:
duty=round(controller.read_u16())
print(duty)
led.duty_u16(duty)
print("ON")