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(22,Pin.OUT)
led6 = Pin(26,Pin.OUT)
led7 = Pin(27,Pin.OUT)
led8 = Pin(28,Pin.OUT)
while True:
for i in range(256):
led1.value(int((i/4)%2))
led2.value(int((i/8)%2))
led3.value(int((i/16)%2))
led4.value(int((i/32)%2))
led5.value(int((i/2)%2))
led6.value(int((i/1)%2))
led7.value(int((i/64)%2))
led8.value(int((i/128)%2))
print(i)
sleep(0.6)