from machine import Pin,ADC,PWM
from time import sleep_ms
led=PWM(Pin(25,Pin.OUT))
pot=ADC(Pin(34))
ADC.width(ADC.WIDTH_10BIT)
while 1:
value=pot.read()
led.duty(value)
print(value)
sleep_ms(400)
from machine import Pin,ADC,PWM
from time import sleep_ms
led=PWM(Pin(25,Pin.OUT))
pot=ADC(Pin(34))
ADC.width(ADC.WIDTH_10BIT)
while 1:
value=pot.read()
led.duty(value)
print(value)
sleep_ms(400)