from utime import sleep
import tm1637
from machine import Pin
tm = tm1637.TM1637(clk=Pin(2), dio=Pin(3))
button1 = Pin(6, Pin.IN, Pin.PULL_UP) #Count up enable internal pull-up resistor 
button2 = Pin(12, Pin.IN, Pin.PULL_UP) #Count down enable internal pull-up resistor 
count=0

while 1:

  if button1.value()==0:
    
    for i in range (0000,9999,100):
      tm.number(i)
      sleep(0.1)
            
  if button2.value()==0:
    
    for i in range (9999,0000,-100):
      tm.number(i)
      sleep(0.1)
    
    tm.number(count)



    
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT
4-Digit Display