We are going to build a simple project - stopwatch using Ardunio Nano.
We will be basically using the millis() function available in the Arduino IDE for the main timing or stopwatch function.
There will be two switches to be used in this project:-
- Black Switch - (Push Button) for start/stop function
- Red Switch - (Push Button) for reset function
Returns the number of milliseconds passed since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days. The return value for millis() is of type unsigned long.
The main working of the firmware is based on millis() function and BOUNCE 2 library functions.
I have used the Bounce2 library for debouncing since there are two push buttons used in this project. It's a great Debouncing library for Arduino and Wiring by Thomas Ouellet Fredericks and other contributors.
Click on this for :- Bounce2 Library
(To be uploaded soon!)