from machine import Pin,Timer
import time
import random
led1=Pin(0,Pin.OUT)
led2=Pin(1,Pin.OUT)
led3=Pin(2,Pin.OUT)
led4=Pin(3,Pin.OUT)
led5=Pin(4,Pin.OUT)
led6=Pin(5,Pin.OUT)
led7=Pin(6,Pin.OUT)
led8=Pin(7,Pin.OUT)
while True:
t=0.5
led1.off()
led2.off()
led3.off()
led4.off()
led5.off()
led6.off()
led7.off()
led8.off()
for n1 in reversed(range (1,9)):
time.sleep(t)
if n1==1:
led1.on()
if n1==2:
led2.on()
if n1==3:
led3.on()
if n1==4:
led4.on()
if n1==5:
led5.on()
if n1==6:
led6.on()
if n1==7:
led7.on()
if n1==8:
led8.on()