from machine import Pin
from time import sleep_ms
#輸入LED腳位LIST
PinN = [14,27,25,33,32,26]
#led的LIST存放LED
led=[]
for j in range(0,len(PinN)):
  x = Pin(PinN[j],Pin.OUT)
  led.append(x)
#LED速度調整
speed_time = 50
while True:
  for i in range(0,len(led),1):
    led[i].on()
    sleep_ms(speed_time)
    led[i].off()
    sleep_ms(speed_time)
  for i in range(len(led)-2,1,-1):
    led[i].on()
    sleep_ms(speed_time)
    led[i].off()
    sleep_ms(speed_time)