from machine import Pin
from time import sleep
# Helper functions
def all_off(pins):
for p in pins:
p.off()
def all_on(pins):
for p in pins:
p.on()
def l_to_r(pins):
for p in pins:
p.on()
sleep(0.4)
all_off(pins)
# Setup
led_white = Pin(0, Pin.OUT)
led_yellow = Pin(1, Pin.OUT)
led_orange = Pin(2, Pin.OUT)
led_red = Pin(3, Pin.OUT)
led_pink = Pin(4, Pin.OUT)
led_purple = Pin(5, Pin.OUT)
led_blue = Pin(6, Pin.OUT)
led_cyan = Pin(7, Pin.OUT)
led_lime = Pin(8, Pin.OUT)
led_green = Pin(9, Pin.OUT)
leds = [led_white, led_yellow, led_orange, led_red, led_pink, led_purple, led_blue, led_cyan, led_lime, led_green]
while True:
l_to_r(leds)
pico:GP0
pico:GP1
pico:GND.1
pico:GP2
pico:GP3
pico:GP4
pico:GP5
pico:GND.2
pico:GP6
pico:GP7
pico:GP8
pico:GP9
pico:GND.3
pico:GP10
pico:GP11
pico:GP12
pico:GP13
pico:GND.4
pico:GP14
pico:GP15
pico:GP16
pico:GP17
pico:GND.5
pico:GP18
pico:GP19
pico:GP20
pico:GP21
pico:GND.6
pico:GP22
pico:RUN
pico:GP26
pico:GP27
pico:GND.7
pico:GP28
pico:ADC_VREF
pico:3V3
pico:3V3_EN
pico:GND.8
pico:VSYS
pico:VBUS
led1:A
led1:C
led2:A
led2:C
led3:A
led3:C
led4:A
led4:C
led5:A
led5:C
led6:A
led6:C
led7:A
led7:C
led8:A
led8:C
led9:A
led9:C
led10:A
led10:C
r1:1
r1:2
r2:1
r2:2
r3:1
r3:2
r4:1
r4:2
r5:1
r5:2
r6:1
r6:2
r7:1
r7:2
r8:1
r8:2
r9:1
r9:2
r10:1
r10:2