Simple Countdown timer using Duemilanove

Hi there,

Gotta say im completely new to the whole programming thing, so bear with me.

What im after is to program an arduino duemilanove to countdown from around 2 hours, and when it reaches the end, it will trigger a piezo siren that i have attached to it.
I know it most probably pretty easy for some of you, but for the complete novice, im outta my depth. I had a friend mention something about using a high side driver, or something like that??

I appreciated any help that i can get.

Thanks

Check - Arduino Playground - StopWatchClass -

Although a stopwatch counts up it becomes fairly easy to add a few lines to do a countdown

pseudocode

long t = 2 * 60 * 60 * 1000L;   // 2 hours
loop()
{
if t - stopwatchtime < 0 ==> buZZ!!!
}

Right thanks for that, ill look into it. Im really struggling with the whole programming piece, essentially i want the easiest way to countdown from 2 hours, and set off a buzzer at that point.
Dont need to display anything,

what stopping me from using a delay(7200000) two hours (similar to the blink) and then telling the pin to go high??

Thanks

what stopping me from using a delay(7200000) two hours (similar to the blink) and then telling the pin to go high??

think nothing, but how long should the pin be HIGH?

delay(7200000UL); // add the UL for Unsigned Long

better

delay(2 * 60 * 60 * 1000UL); // shows better that it is 2 hours...