from machine import Pin
from time import sleep
led1 = Pin(21,Pin.OUT)
led2 = Pin(20,Pin.OUT)
led3 = Pin(19,Pin.OUT)
led4 = Pin(18,Pin.OUT)
led5 = Pin(17,Pin.OUT
led6= Pin(16,Pin.OUT)
led7= Pin(15,Pin.OUT)
led8= Pin(14,Pin.OUT)
while True:
for i in range(16):
led1.value(i%2)
led2.value(int((i/2)%2))
led3.value(int((i/4)%2))
led4.value(int((i/8)%2))
led5.value(int((i/8)%2))
led6.value(int((i/8)%2))
led5.value(int((i/8%2))
)
print(i)
sleep(1)