from machine import Pin,PWM,ADC
from time import sleep
redLED = PWM(Pin(4),5000)
pot = ADC(Pin(34))
pot.atten(ADC.ATTN_11DB)
pot.width(ADC.WIDTH_10BIT)
while True:
value=pot.read()
print(value)
redLED.duty(value)
from machine import Pin,PWM,ADC
from time import sleep
redLED = PWM(Pin(4),5000)
pot = ADC(Pin(34))
pot.atten(ADC.ATTN_11DB)
pot.width(ADC.WIDTH_10BIT)
while True:
value=pot.read()
print(value)
redLED.duty(value)