from machine import Pin
import time
pins=[
Pin(12, Pin.OUT),
Pin(13, Pin.OUT),
Pin(26, Pin.OUT),
Pin(33, Pin.OUT),
Pin(32, Pin.OUT),
Pin(14, Pin.OUT),
Pin(27, Pin.OUT)
]
char = [
[0,0,0,0,0,0,1],
[1,0,0,1,1,1,1],
[0,0,1,0,0,1,0],
[0,0,0,0,1,1,0],
[1,0,0,1,1,0,0],
[0,1,0,0,1,0,0],
[0,1,0,0,0,0,0],
[0,0,0,1,1,1,1],
[0,0,0,0,0,0,0],
[0,0,0,0,1,0,0]]
powerA = Pin(2, Pin.OUT)
powerB = Pin(15, Pin.OUT)
count = 0
while True:
value_A = count % 10
value_A = char[value_A]
value_B = int((count / 10) % 10)
value_B = char[value_B]
if count > 99:
count = 0
if count <= 99:
for i in range(7):
pins[i].value(value_A[i])
powerA.on()
powerB.off()
time.sleep_ms(50)
powerA.off()
for i in range(7):
pins[i].value(value_B[i])
powerB.on()
time.sleep_ms(100)
powerB.off()
count += 1