# 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("Mangenta"); time.sleep(2)
leds (1,1,0);print("Amarillo"); time.sleep(2)
leds (1,1,0);print("Blanco"); time.sleep(2)