#CONTROL LED BRIGHTNESS USING POTENTIOMETER
from machine import Pin, PWM, ADC
adc = machine.ADC(28)
pwm0 = PWM(Pin(15))
pwm0.freq(1000)
while True:
digital_value = adc.read_u16()
pwm0.duty_u16(digital_value)
#CONTROL LED BRIGHTNESS USING POTENTIOMETER
from machine import Pin, PWM, ADC
adc = machine.ADC(28)
pwm0 = PWM(Pin(15))
pwm0.freq(1000)
while True:
digital_value = adc.read_u16()
pwm0.duty_u16(digital_value)