from machine import Pin
from time import sleep
a=19
b=15
c=2
d=18
e=4
f=5
g=21
h=22
# Define the LED pin (in this case, GPIO 2)
led1=Pin(b,Pin.OUT)
led2=Pin(a,Pin.OUT)
led3=Pin(c,Pin.OUT)
led4=Pin(d,Pin.OUT)
led5=Pin(e,Pin.OUT)
led6=Pin(f,Pin.OUT)
led7=Pin(g,Pin.OUT)
led8=Pin(h,Pin.OUT)
# Blink the LED
while True:
led1.on() # Turn on the LED
sleep(0.03) # Wait for 1 second
led1.off() # Turn off the LED
sleep(0.03)
led6.on()
led4.on() # Turn on the LED
sleep(0.03) # Wait for 1 second
led6.off()
led4.off() # Turn off the LED
sleep(0.03)
led3.on()
led7.on() # Turn on the LED
sleep(0.03) # Wait for 1 second
led3.off()
led7.off() # Turn off the LED
sleep(0.03)
led5.on()
led8.on() # Turn on the LED
sleep(0.03) # Wait for 1 second
led5.off()
led8.off() # Turn off the LED
sleep(0.03)
led2.on() # Turn on the LED
sleep(0.03) # Wait for 1 second
led2.off() # Turn off the LED
sleep(0.03)