How To Create A Countdown Timer In Javascript
Introduction: Party Countdown Timer
Timers are needed for distinct purposes, because most a times, a definite time is assigned to particular tasks.
So in this project, you will learn how to make a countdown timer of 10 seconds that can be used to time quizzes, brain teasers and other events in a party. The time can be adjusted if required.
We will be using Arduino to control the whole process, and the whole circuit will be packaged in cardboard. So let's move on.
Step 1: Supplies
Step 2: Setup the Circuit
The circuit should be connected according to the breadboard schematic as seen in the images above. Everything will be setup on the breadboard, so no need for soldering.
The 7 segment display should be scrupulously connected else unexpected digits might be displayed. Also, it's advisable to make the wires as short as possible so that the connections will not look unnecessary complex. As seen in the image, the Arduino should be mounted beneath the breadboard so that it can fix in the cardboard casing. Also take note of the polarities of the components.
Step 3: The Code
The code below controls the process, it will be uploaded to the Arduino via the USB. I have commented on each segment for proper understanding. So you can just download the code, have a look at it and upload.
Step 4: Working Process
After uploading the code, you can test the circuit.
The process is that when the button is pressed, the counter starts to countdown until 0. After the buzzer sounds and the red light is activated.
But if the button is pressed before the end of the countdown, the process will be interrupted and the timer stops.
Step 5: Cut the Cardboard
The cardboard will be used to form a box that will embed the circuit.
Therefore, use your pencil and ruler to mark out a cuboid of dimension of 17cm x 7cm x 4.5cm on the cardboard. Then cut out the marked area.
Next is to cut holes for the LED bar graph, 7 segment display, buzzer, button and the LEDs. All you need to do is to measure the dimension of the components and cut out the dimension on the cardboard.
Step 6: Enclosure
When done with cutting the cardboard, you can glue aome edges of the cardboard to form something like a box. Then take the circuit i.e the breadboard and the Arduino and insert it into the cardboard box.
After doing that, you can glue the open side(s) of the box. And that's all about it. Your countdown timer is now ready.
Step 7: Enjoy
Have fun!
Be the First to Share
Recommendations
-
Anything Goes Contest 2021
How To Create A Countdown Timer In Javascript
Source: https://www.instructables.com/Party-Countdown-Timer/
Posted by: smithspoe1957.blogspot.com
0 Response to "How To Create A Countdown Timer In Javascript"
Post a Comment