This Instructable will teach you how to create a countdown timer using a 4 Digit 7-Segment Display that can reset with a button.
Included in this Instructable is the required materials, the correct wiring, and a downloadable file of the code that was to program the function of the 4 Digit 7-Segment Display.
To create the 4 Digit 7-Segment Display timer, you will need the following:
To help wire the 4 Digit 7-Segment Display, I first identified the pins of the 4 Digit 7-Segment Display and what they control.
After identifying the pins of the 4 Digit 7-Segment Display, I created my own schematic to decide how I was going to Wire the Arduino to the 4 Digit 7-Segment Display. Adding onto that, I made a chart to help identify the 4 Digit 7-Segment Display pin, its function, and what that pin was connected to on the Arduino.
After placing the 4 Digit 7-Segement and Push Button on your Breadboard, the first step is to wire the 4 different digit pins to the first four pins to the Arduino as the chart says.
After this, continue to wire the remaining 4 Digit 7-Segment Display pins to the Arduino as the chart suggests. To make it easier for myself, I started with wiring the Digit Pins then finished with the individual light segments as the addition of those wires becomes messy.
Next, the remaining pins of the Arduino (13 and 5), will be used to wire the Push Button. These wires will be on the same side of the button.
Attached to this step of the Instructable is the code I used to program the 4 Digit 7-Segment Display.
This code highlights the previous step with identifying the pins of the 4 Digit 7-Segment Display, their function, and where they are wired on the Arduino.
Also, parts of the code highlight the areas that can be modified to change the starting time being counted down, as well as the time that the button restarts to after the button is pressed.
Reminder: 1 second = 1000
With the correct wiring and downloaded code, the timer will work.
Attached is a video of the 4 Digit 7-Segment display working. Whenever the button is pressed, all four digits will display a '0'.