Hello,
I'm trying to do a countdown timer for 1 hour, can anyone help me with the code?
I've been trying to find the code on the web and I found some code but it never success.
Please help me!
Thank You!
Did you manage to get the DS1302 working on it's own? If not, start with that.
Why a DS1302? You can use a millis() based approach as well.
How fast does it have to count down?
Read the current time and remember in a variable as a unix timestamp.
2)
Keep reading the DS1302 and check if the new value is e.g. one minute later than the stored value.
3)
If so, decrement the countdown, display it and remember this time as a unix timestamp.
4)
If countdown equals zero, stop. Else back to (2)
Hi,
Have you got some code running that just gets the time from the 1302 RTC?
Forget about countdown timer at the moment,
How accurate do you need the 1 hour to be?
You could just use the Arduino's milli function to count down.
What model Arduino are you using?
Thanks.. Tom..