This blog is a record of what I do, what I think and what I read. If you are interested to know about my professional experience, you can refer to the other blog of mine. http://admi2camac.blogspot.com/
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment