from machine import Pin
from time import sleep
Pines = [23, 22, 21, 19, 18, 5, 17, 16, 4, 2]
Leds = [Pin (x, Pin.OUT) for x in Pines]
while True:
for x in range (5):
Leds [x].value (1)
Leds [9-x].value (1)
sleep (1)
Leds [x].value (0)
Leds [9-x].value (0)
for x in range (3, 0, -1):
Leds [x].value (1)
Leds [9-x].value (1)
sleep (1)
Leds [x].value (0)
Leds [9-x].value (0)