Need help with Time in Arduino

Hi guys,

I'm a newbie at coding for the arduino so i need help. I'm trying to make an a few leds turn off as time goes on, the problem is, I can seem to find the function that performs this, I tried a few times myself to come up with something but I'm stuck. What I'm trying to do exactly is there is 3 colors of different LED's (red, yellow, green) in a 50 minute or so period, as the time goes on I need the LED's to turn off one by one. If someone could help me out or just explain to me how to make a time sketch, that would be great.

Thanks
-chris

Look at the Blink without Delay sketch in the examples that come with the IDE. Also look under the (surprise!) Time heading on the reference page.

thewaltonn:
Hi guys,

I'm a newbie at coding for the arduino so i need help. I'm trying to make an a few leds turn off as time goes on, the problem is, I can seem to find the function that performs this, I tried a few times myself to come up with something but I'm stuck. What I'm trying to do exactly is there is 3 colors of different LED's (red, yellow, green) in a 50 minute or so period, as the time goes on I need the LED's to turn off one by one. If someone could help me out or just explain to me how to make a time sketch, that would be great.

Thanks
-chris

two ways... use a millis() timer to sequence your legs, or use a Real Time Clock and the Time.h library, and be able to select the time of day you want to flash and blink.

lots of examples, start with the ones in the IDE.

The demo Several Things at a Time is an extended example of BWoD.

...R