Tuesday, 21 February 2023

Stop watch using TM1637

from machine import Pin import time import tm1637 tm = tm1637.TM1637(clk=Pin(4), dio=Pin(5)) Button = Pin(2, Pin.IN) a = 0 b = 0 tm.show(' ') tm.numbers(a,b) while True: if Button.value() == 1: while True: tm.numbers(a,b) b = b+1 time.sleep(1) if b > 59: b = 0 a = a+1 time.sleep(1) #Stop watch using Raspberry Pi Pico #https://electricdiylab.com/stopwatch-using-raspberry-pi-pico/#Schematic_Diagram

No comments: