from machine import Pin, Timer
from time import sleep
g1 = Pin(9, Pin.OUT)
y1 = Pin(5, Pin.OUT)
r1 = Pin(0, Pin.OUT)
g2 = Pin(8, Pin.OUT)
y2 = Pin(3, Pin.OUT)
r2 = Pin(1, Pin.OUT)
g4 = Pin(16, Pin.OUT)
y4 = Pin(17, Pin.OUT)
r4 = Pin(18, Pin.OUT)
g3 = Pin(27, Pin.OUT)
y3 = Pin(26, Pin.OUT)
r3 = Pin(28, Pin.OUT)
while True:
g1.on()
r2.on()
r3.on()
r4.on()
sleep(10)
g1.off()
r2.off()
y1.on()
y2.on()
sleep(2)
y1.off()
y2.off()
g2.on()
r1.on()
sleep(10)
g2.off()
r3.off()
y2.on()
y3.on()
sleep(2)
y2.off()
y3.off()
g3.on()
r2.on()
sleep(10)
g3.off()
r4.off()
y3.on()
y4.on()
sleep(2)
y3.off()
y4.off()
g4.on()
r3.on()
sleep(10)
g4.off()
r3.off()
r1.off()
y4.on()
y1.on()
sleep(2)
y4.off()
y1.off()
Loading
pi-pico-w
pi-pico-w