#Write a MicroPython program to light up each of the Segments of the 7-segment display one after the other
from machine import Pin
from time import sleep
pins = [2,4,16,17,5,18,19]
data = [
[0,1,1,1,1,1,1],
[1,0,1,1,1,1,1],
[1,1,0,1,1,1,1],
[1,1,1,0,1,1,1],
[1,1,1,1,0,1,1],
[1,1,1,1,1,0,1],
[1,1,1,1,1,1,0]
]
for x in pins:
Pin(x,Pin.OUT)
Pin(x).value(1)
while True:
for y in range(7):
for x in range(7):
Pin(pins[x]).value(data[y][x])
sleep(2)