from machine import Pin
from time import sleep
pins=[Pin(33,Pin.OUT),Pin(25,Pin.OUT),Pin(14,Pin.OUT),Pin(27,Pin.OUT),Pin(26,Pin.OUT),
Pin(13,Pin.OUT),Pin(12,Pin.OUT)]
char=[
[0,0,0,0,0,0,1], #0
[1,0,0,1,1,1,1], #1
[0,0,1,0,0,1,0], #2
[0,0,0,0,1,1,0], #3
[1,0,0,1,1,0,0], #4
[0,1,0,0,1,0,0], #5
[0,1,0,0,0,0,0], #6
[0,0,0,1,1,1,1], #7
[0,0,0,0,0,0,0], #8
[0,0,0,1,1,0,0] #9
]
s1=Pin(21,Pin.IN)
s2=Pin(15,Pin.IN)
count=0
while True:
if(s1.value()==1):
count=count+1
elif(s2.value()==1):
count=count-1
for i in range(0,6):
pins[i].value(char[count][i])
sleep(0.2)