import machine
import utime
pin = [6,7,8,9,10,11,12,13,14,15]
led= []
for i in range(10):
led.append(None)
led[i] = machine.Pin(pin[i], machine.Pin.OUT)
while True:
for i in range(10):
led[i].toggle()
utime.sleep(0.2)
/\ This resistor is going to the side
because of the gap in the ground rail.
< This red wire doesn't matter since its not
connected to anything. It's there just because
I have a habit of connecting the power rails.