#2

import time
from machine import Pin


# led0 = Pin(0,Pin.OUT)
# led1 = Pin(2,Pin.OUT)
# led2 = Pin(6,Pin.OUT)
# led3 = Pin(10,Pin.OUT)
# led4 = Pin(14,Pin.OUT)

# for i in range (1,32):
#     print(i)
#     if i&1:
#         led0.on()
#     if i&2:
#         led1.on()
#     if i&4:
#         led2.on()
#     if i&8:
#         led3.on()
#     if i&16:
#         led4.on()
#     time.sleep(1)
#     led0.off()
#     led1.off()
#     led2.off()
#     led3.off()
#     led4.off()

led = [Pin(0,Pin.OUT),Pin(2,Pin.OUT),Pin(6,Pin.OUT),Pin(10,Pin.OUT),Pin(14,Pin.OUT)]
for i in range (1,32):
    for j in range (5):
        if (i>>j)&1:
            led[j].on()
    print(i)
    time.sleep(1)
    for j in range (5):
        led[j].off()
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT