from machine import Pin
from time import sleep
Red= Pin(28, Pin.OUT)
Green= Pin(27, Pin.OUT)
Blue= Pin(26, Pin.OUT)
def cor(msg):
    if msg == "vermelho":
        Red.value(1)
        Green.value(0)
        Blue.value(0)
    if msg == "verde":
        Green.value(1)
        Blue.value(0)
        Red.value(0)
    if msg == "azul":
        Blue.value(1)
        Green.value(0)
        Red.value(0)
    if msg == "branco":
        Red.value(1)
        Green.value(1)
        Blue.value(1)
    if msg == "amarelo":
        Red.value(1)
        Green.value(1)
        Blue.value(0)
    if msg == "desligado":
        Red.value(0)
        Green.value(0)
        Blue.value(0)
while True:
    cor("vermelho")
    sleep(1)
    cor("verde")
    sleep(1)
    cor("azul")
    sleep(1)
    cor("amarelo")
    sleep(1)
    cor("branco")
    sleep(1)
    cor("desligado")
    sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT