Go Down

Topic: Time Library added to Playground (Read 39 times) previous topic - next topic

Glasshopper

Quote
I guess I had an older version of Time that didn't have TimeAlarms?

Quote
Yes, the  TimeAlarms library was only added recently. Perhaps you can report how you get on with the alarms library in the thread linked above.


It was a joy to use!!
your example was simple & thorough enough for me to understand how to use it.

The only confusion I had was timerRepeat is only in seconds and not
formatted like alarmRepeat but it did not take long to figure out time time * 60 to get minutes.

thank you for such a wonderful & versatile library!  ;)

mem

#26
Jan 19, 2010, 09:10 am Last Edit: Jan 19, 2010, 09:10 am by mem Reason: 1
Glasshopper, good to hear you found the library useful

Quote
? timerRepeat is only in seconds and not formatted like alarmRepeat ?
You should be able to set timers just like alarms, did you try something like :  Alarm.timerRepeat( 1,30,0, TimerTask);   // set timer to repeat every 1 hour and 30 minutes

Peeter123

I have created a Visual Basic application based on the code from Moriszen.

Here is the link: http://www.megaupload.com/?d=1A76PJ5F

moriszen

Nice to see you got it posted .
Does anyone know if the time library will work in idle - low power mode .
I want to have an application that wakes up once or twice a day an logs the time and date (running on batteries) .
any suggestions ?

mem

The time library relies on the Arduino millis timer which services an interrupt every millisecond. This means it will not work in low power mode.

For an application that needs to wake up once or twice a day you would probably need to use a low power Real Time Clock that generated an interrupt that would wake up the Arduino when it needed to log something. Have a look in the playground to see if anyone has published an RTC application that does something like this.

Go Up