Hi Arduino users,
I just have a simple problem with Alarm.delay(...) in TimeAlarms library.
If I setup an alarm to 8 oclock :
Alarm.alarmRepeat(8,30,0, MorningAlarm); // 8:30am every day
And then, in this alarm I just print "hello" then wait a delay, and print "Goodbye" :
// functions to be called when an alarm triggers:
void MorningAlarm(){
Serial.println("Hello");
Alarm.delay(TimeToPause);
Serial.println("Goodbye");
}
Then, if I defined the wainting time to 10sec all is ok:
int TimeToPause = 10000;
But then, if I defined the waiting time to 50sec, the program wil never say goodbye.. ??
int TimeToPause = 50000;
I modified the TimeAlarms.h example so you can try the program and see the problem (file attached).
http://dl.free.fr/iThLXB76Z
(Of course you need TimeAlarms.h and Time.h library)
Thanks a lot for you help