import time
from machine import Pin, ADC, PWM
frecuency = 1000
ledRojo = PWM(Pin(19),frecuency)
ledVerde = PWM(Pin(18),frecuency)
ledAzul = PWM(Pin(17),frecuency)
potRojo = ADC(Pin(34))
potVerde = ADC(Pin(32))
potAzul = ADC(Pin(33))
while True:
valRojo = potRojo.read()
valVerde = potVerde.read()
valAzul = potAzul.read()
brigRojo=int(valRojo/4)
brigVerde=int(valVerde/4)
brigAzul=int(valAzul/4)
ledRojo.duty(brigRojo)
ledVerde.duty(brigVerde)
ledAzul.duty(brigAzul)
time.sleep(0.1)