from machine import Pin
from utime import sleep
red= Pin(15, Pin.OUT)
blue= Pin(2, Pin.OUT)
yellow= Pin(0, Pin.OUT)
red2= Pin(4, Pin.OUT)
blue2= Pin(16, Pin.OUT)
yellow2= Pin(17, Pin.OUT)
red3= Pin(5, Pin.OUT)
blue3= Pin(18, Pin.OUT)
yellow3= Pin(19, Pin.OUT)
red4= Pin(12, Pin.OUT)
blue4= Pin(14, Pin.OUT)
yellow4= Pin(27, Pin.OUT)
red5= Pin(26, Pin.OUT)
blue5= Pin(25, Pin.OUT)
yellow5= Pin(33, Pin.OUT)
def colors(r, b, y):
red.value(r)
blue.value(b)
yellow.value(y)
def colors2(r2, b2, y2):
red2.value(r2)
blue2.value(b2)
yellow2.value(y2)
def colors3(r3, b3, y3):
red3.value(r3)
blue3.value(b3)
yellow3.value(y3)
def colors4(r4, b4, y4):
red4.value(r4)
blue4.value(b4)
yellow4.value(y4)
def colors5(r5, b5, y5):
red5.value(r5)
blue5.value(b5)
yellow5.value(y5)
while True:
colors(1,0,0)
sleep(1)
colors2(1,0,0)
sleep(1)
colors3(1,0,0)
sleep(1)
colors4(1,0,0)
sleep(1)
colors5(1,0,0)
sleep(1)
colors(0,1,0)
colors2(0,1,0)
colors3(0,1,0)
colors4(0,1,0)
colors5(0,1,0)
sleep(1)
colors(0,0,0)
colors2(0,0,0)
colors3(0,0,0)
colors4(0,0,0)
colors5(0,0,0)
sleep(2)