In this project, we created a simple stopwatch with an LCD screen and buttons for start, stop, and reset. Two buttons or modes, a start, and a stop mode are always present on a stopwatch. Although it might have additional features, these are always present. The reset function has also been included. By depressing the Arduino’s reset button, this can be accomplished.
The Arduino can show functions up to the value in milliseconds with 100% accuracy thanks to the millis feature of the Arduino Code. After the decimal point, we can display up to 4 digits. However, we just showed 2 digits here. A 4-digit 7-segment display can be used for the same project.
- Arduino UNO Board
- 16*2 LCD Display
- Push-Buttons – 2
- Connect jumpers wires
Circuit: Stopwatch Using Arduino & LCD Display
Assemble the circuit as shown in the figure below and make the following connections.
- Connect Pin no 4,6,11,12,13,14 of LCD to Pin no 7,6,5,4,3,2 of Arduino.
- Connect the two push buttons to digital pin 8 and 9 of Arduino.
Working & Operations:
Press Start will be displayed once the code has been uploaded to the Arduino Board. Therefore, all you need to do is push the start button to begin the timer. Simply press the Stop button to stop the timer from running. So the stopwatch will come to a stop. Simply hit the reset button on the Arduino UNO Board if you want to reset the circuit right now.
Here is the code for an Arduino stopwatch with an LCD display. Transfer it to your Arduino UNO Board by copying it.
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
double i = 0;
double a = millis();
double c ;
if(digitalRead(8) == LOW)
a = millis();
while(digitalRead(9) == HIGH)
c = millis();
i = (c – a) / 1000;
if(digitalRead(9) == LOW)
while(digitalRead(8) == HIGH)