I'm a newbie first off I'm learning Arduino and need to make a countdown timer that will start at 15 minutes with a green light on as it counts down once it reaches 0 a red light will then cut on and the green light goes off however the timer will contiue to count 00.01 00.02 etc it will also have a start stop and reset as well and for a little added difficulty when you hit stop it will show you the total time example above would be 15.02...is this possible? And what would I need to achieve this...any advice would be appreciated!! Thanks!
carter28899:
I'm a newbie first off I'm learning Arduino and need to make a countdown timer that will start at 15 minutes with a green light on as it counts down once it reaches 0 a red light will then cut on and the green light goes off however the timer will contiue to count 00.01 00.02 etc it will also have a start stop and reset as well and for a little added difficulty when you hit stop it will show you the total time example above would be 15.02...is this possible? And what would I need to achieve this...any advice would be appreciated!! Thanks!
About five or six periods, a comma or two and some line breaks would be a good way to ask your question.
You want to count in 1 / 100 second increments? What are you using for display?
Have a look at the BlinkWithoutDelay example in the Arduino IDE.
File -> Examples -> 02.Digital -> BlinkWithoutDelay
This will show you how to execute some code in a fixed interval. The rest is up to you. You can choose an interval, create a variable and count that down. How often you do that is up to you e.g. every minute or every millisecond.
If you get stuck, post your code (uses code tags) and let us know what works and what does not. There is a "How to post " at the beginning of each sub forum with additional tips about posting.