#Programa para encender un RGB
from machine import Pin
import time
#crear los objetos
ledrojo = Pin(12, Pin.OUT)
ledverde = Pin(26, Pin.OUT)
ledazul = Pin(32, Pin.OUT)
def leds (a, b, c):
ledrojo(not a)
ledverde(not b)
ledazul(not c)
while True:
leds (0, 0, 0); print("Ningun color"); time.sleep(2)
leds (0, 0, 1); print("Azul"); time.sleep(2)
leds (0, 2, 0); print("Verde"); time.sleep(2)
leds (0, 1, 1); print("Cian"); time.sleep(2)
leds (1, 0, 0); print("Rojo"); time.sleep(2)
leds (1, 0, 1); print("Magenta"); time.sleep(2)
leds (1, 1, 0); print("Amarillo"); time.sleep(2)
leds (1, 1, 1); print("Blanco"); time.sleep(2)