from machine import Pin
import time
pins=[Pin(22,Pin.OUT),Pin(23,Pin.OUT),
Pin(2,Pin.OUT),Pin(4,Pin.OUT),
Pin(5,Pin.OUT),Pin(21,Pin.OUT),
Pin(19,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(12,Pin.OUT)
powerB=Pin(13,Pin.OUT)
count=0
# a=int(input("ENTER FROM VALUE: "))
# b=int(input("ENTER TILL VALUE: "))
while True:
value_A=count%10
value_A=char[value_A]
value_B=int((count/10)%10)
value_B=char[value_B]
for _ in range(20):
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(50)
powerB.off()
count=count+1
if count>99:
count=0