@ noob, you would probably want something like this:
void loop () {
if (tick) { // If a tick has occured
seconds = seconds - 1; // Decrement the seconds
tick = 0; // reset the tick flag
if (seconds<0){ // If a minute has passed
seconds = 59; // Send seconds back to 59
minutes = minutes - 1; // Decrement the minutes
if (minutes <0)
{
//countdown has finished, set off an alarm or something
}
}
}
}
only use this as a guide as i havent got an arduino yet nor ever used one ![]()