from machine import Pin
import time
# Define pin numbers for RGB LED
pins = [12, 13, 14]
# Define RGB colors (as tuples of red, green, blue values)
colors = [(1, 0, 0), # Red
(0, 0, 0), # Off
(1, 1, 0), # Yellow
(0, 0, 0), # Off
(0, 1, 0), # Green
(0, 0, 0)] # Off
# Setup pins as outputs
for pin_num in pins:
pin = Pin(pin_num, Pin.OUT)
# Main loop
while True:
for i in range(6):
for j in range(3):
pin = Pin(pins[j], Pin.OUT)
pin.value(colors[i][j])
time.sleep(1)