from machine import Pin
import time
# GPIO pins for LEDs (change if your wiring is different)
LED_pins = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# initialize LED objects
leds = [Pin(p, Pin.OUT) for p in LED_pins]
# timestamps
previous_time = [0] * 10
def blink_10(index, interval):
current_time = time.ticks_ms()
if time.ticks_diff(current_time, previous_time[index]) > interval:
previous_time[index] = current_time
leds[index].value(not leds[index].value()) # toggle LED
while True:
blink_10(1, 200)
blink_10(2, 300)
blink_10(3, 400)
blink_10(4, 500)
blink_10(5, 600)
blink_10(6, 700)
blink_10(7, 800)
blink_10(8, 900)
blink_10(9, 1000)
blink_10(0, 1100)