from machine import Pin
from time import sleep
#List of GPIO pins connected to LEDs
led_list = [6,7,8,9,10,11,12,13]
# Initialize a list to hold Pin objects for LEDs
led = [None] * 8
# Assign Pin objects to the led list
for i in range(8):
led[i] = Pin(led_list[i], Pin.OUT)
print(led[i]) #Verify if Pin objects are correctly added to the list
# Turn off all LEDs
for i in range(8):
led[i].value(1) #Turn on LED
sleep(0.5) #Delay for 0.5 seconds