from machine import Pin
import time

# 定义LED引脚
led = [0, 1, 2, 3,  8, 9, 10, 11, 26, 27, 28,29]

# 初始化LED引脚
led_pins = [Pin(pin_num, Pin.OUT) for pin_num in led]

while True:
    # 同时点亮所有LED
    for pin in led_pins:
        pin.value(1)  # 点亮LED
    time.sleep(1)  # 等待1秒钟

    # 同时关闭所有LED
    for pin in led_pins:
        pin.value(0)  # 关闭LED
    time.sleep(1)  # 等待1秒
