Components and supplies
Jumper wires (generic)
SparkFun 7-Segment Serial Display - Red
Breadboard (generic)
Arduino Mega 2560
USB-A to Mini-USB Cable
Apps and platforms
Arduino IDE
Project description
Code
The code
arduino
Use this code to run your countdown timer
Downloadable files
The schematic
Use this connection diagram to connect your 4 digit display to your arduino
The schematic
The schematic
Use this connection diagram to connect your 4 digit display to your arduino
The schematic
Comments
Only logged in users can leave comments
Anonymous user
2 years ago
maybe I don't understand something, but why my timer stopped 8888 I tried to mess around with the code, but nothing happened, please tell me
ebolson
2 years ago
same thing happened to me, did you have any luck?
Anonymous user
2 years ago
Can I make this loop (As in auto-reset and restart) Thanks
helpmefirstineedhelp
2 years ago
hi I was wondering if you can use a arduino uno in this project?
lplnmdh
2 years ago
can you fix this for me plz i want this for watering system unsigned long Levent = 10000 ; unsigned long Pevent = 10000 ; static unsigned long preTL = 0 ; static unsigned long preTP = 0 ; int MAXL = 5000; void setup() { Serial.begin(9600); } void loop() { unsigned long currenttime = millis(); if (currenttime - preTL >= Levent) { // do Thing A } else if (currenttime - perTL >= MAXL) { // do Thing B } else { // do Thing C } if(currenttime - preTP >= Pevent) { //relay turn on cods delay (100000); //relay turn off cods delay (500); preTP = currenttime ; } }
sdeornellas
2 years ago
Sorry, very new over here. In the diagram/schematic there are no indications for what pins to connect to on the spark fun timer board. Additionally, in the mage for the project itself it looks like just the display is used, not the board it ships mounted to. Am I missing something obvious? how do I know what leads to connect to the Arduino?
siebeettema
2 years ago
can I set the timer to hours or minutes instead of seconds ???
Anonymous user
3 years ago
maybe I don't understand something, but why my timer stopped 8888 I tried to mess around with the code, but nothing happened, please tell me
sdeornellas
3 years ago
Sorry, very new over here. In the diagram/schematic there are no indications for what pins to connect to on the spark fun timer board. Additionally, in the mage for the project itself it looks like just the display is used, not the board it ships mounted to. Am I missing something obvious? how do I know what leads to connect to the Arduino?
Anonymous user
4 years ago
Can I make this loop (As in auto-reset and restart) Thanks
ebolson
2 years ago
try an if statement that if n=0 set n to start time
ebolson
4 years ago
If i adjusted the pick number in lines 78,83,89,94 would it be possible to have the display show tenths and hundreths of a second? also, where does pin 0 connect? p is used to clear the display but you dont say where it connects.
Anonymous user
2 years ago
I changed the 100 to 10 on line 51 and it gave me hundredth
Anonymous user
2 years ago
maybe I don't understand something, but why my timer stopped 8888 I tried to mess around with the code, but nothing happened, please tell me
lplnmdh
5 years ago
can you fix this for me plz i want this for watering system unsigned long Levent = 10000 ; unsigned long Pevent = 10000 ; static unsigned long preTL = 0 ; static unsigned long preTP = 0 ; int MAXL = 5000; void setup() { Serial.begin(9600); } void loop() { unsigned long currenttime = millis(); if (currenttime - preTL >= Levent) { // do Thing A } else if (currenttime - perTL >= MAXL) { // do Thing B } else { // do Thing C } if(currenttime - preTP >= Pevent) { //relay turn on cods delay (100000); //relay turn off cods delay (500); preTP = currenttime ; } }
siebeettema
5 years ago
can I set the timer to hours or minutes instead of seconds ???
carlosca001
2 years ago
HI thanks for the info