Go Down

Topic: Regarding the TimeAlarm Library (Read 684 times) previous topic - next topic

draythomp

There used to be an Alarm library that worked with the time library.  I've read the posts about it.  User Mem wrote it I believe.  This sounds like exactly the thing I need for a device I'm working on.  What happened to it?  I can't find it in the playground or any mention of it in there.

Mem, are you still supporting it?  Did it go away?
Trying to keep my house under control http://www.desert-home.com/

olikraus

This is probably not the answer you requested, but I added a use case about check for an alarm condition to our DS1307 library:

http://code.google.com/p/ds1307new/wiki/Reference

The DS1307new library is a powerful library for the Arduino which handles access to the DS1307 device.

Oliver

bperrybap

http://tinyurl.com/4x4blv3  ;)

I believe that is what you are looking for. The download has the time library,
timealarms library, and a ds1307 library.

There is also the metro library:
http://www.arduino.cc/playground/Code/Metro
if you only need intervals and not the actual time.

--- bill

draythomp

Oliver: Nice job.  For my particular application I'm using a GPS receiver so I have the time available without needing to use a RTC.  Also, it's a cool use of technology since the GPS carries its own RTC inside and I just leverage it.  What I want to do is really mundane, stuff like turning lights on and off, starting motors, that kind of thing.  It's interesting that there isn't something like that heavily used and advertised since everyone builds a clock with an arduino at some point.

Bill: Cool little hint for me to use google.  Problem is that the first item on the list (I'm assuming that was your intent since the script ended there) doesn't mention the TimeAlarm library so I'm not sure the author intended it to be used.  I've looked at that page several times and the dates on the files inside go back over a year.  That's millennia in arduino development time.

It's interesting how I can't seem to find mention of the alarm library in the playground; just in various postings.  It must be there somewhere just not obvious to me.   If someone that has used it more recently doesn't respond, I'll give it a try and see how it holds up.  There's been a number of changes in the IDE and board since the library was put in place.
Trying to keep my house under control http://www.desert-home.com/

draythomp

I followed up on my threat to try the library out.  After reading the various threads on it and incorporating some of the changes that are described in a couple of the threads, it works really, really great.

No, you can't turn off a timer; no you can't reset a timer so it doesn't fire.  Those changes are certainly possible, but you'd have to add your own code to it to accomplish these things. 

But darn, it can make programs much easier.  I no longer have to count milliseconds between data requests I send, I just set an alarm, write the callback function and forget it.  You can turn on an LED in the code, set a timer to expire when you want the LED to go off and forget it.   You can turn a motor on, set a timer to turn it off in 10 minutes, tomorrow, next week and just forget it.  You can turn off the swimming pool motor at dinner time every day to be sure the kids don't leave it on. 

So, I recommend folks that deal with times greater than milliseconds for asynchronous events around the house, take a look at this library.  It could be just what you need to handle turning off the porch light for you when you forget.  I just wish the author was around so I could complement him directly.
Trying to keep my house under control http://www.desert-home.com/

Go Up