#seven segment for up down counter
# Common Anode
from machine import Pin
from time import sleep
pins=[Pin(34, Pin.OUT),Pin(35, Pin.OUT),Pin(32, Pin.OUT),Pin(33, Pin.OUT),
Pin(25, Pin.OUT),Pin(26, Pin.OUT),Pin(27, Pin.OUT)]
key1=Pin(21,Pin.IN)
key2=Pin(15,Pin.IN)
count=0
digits=[[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]
]
if(key1.value() == True):
time.sleep(0.1)
if(key1.value() == False):
count++
elif(key2.value() == True):
time.sleep(0.1)
if(key2.value() == False):
count--
for i in range(7):