implementing Digital three Alarm Clock for a week

Hi, Greeting Everyone,

I m student.I m going to make a digital medicine box using LCDkeypad,DS1307,SD card reader and LED…
I m success to interface LCDkeypad n DS1307 for manually Resetable clock but i m not able to attach ALARM for a WEEK three times in a day…

My final objectives is, when alarm ringing it will play a music from sd card and one specific LED Blink,and there are 21 LED for a week(3*7=21).

I needs help.
please sir, Help me…
Thank u in advance…

sketch_apr05b.ino (11.1 KB)

   Alarm.alarmRepeat(10,30,0, MorningAlarm);  // 8:30am every day
  Alarm.alarmRepeat(10,40,0,NoonAlarm);  // 5:45pm every day
   Alarm.alarmRepeat(10,50,0, NightAlarm);  // 8:30am every day

Useless comments MUST be kept accurate, or we WILL laugh at you.

Did you read the documentation that came with the TimeAlarms library? You no longer use delay() anywhere in your program, if you want the TimeAlarms class to function properly.

Hi nayimuddin, i check your code i use onece a int array to control a week alarm, buy never 3 alarms haha,

if the alarm time it always the same you can do something simple like this:

byte hourAlarm1 = 8 // hours in 24h format byte minAlarm1 = 30 byte hourAlarm2 = 17 // hours in 24h format byte minAlarm2 = 45 byte hourAlarm3 = 20 // hours in 24h format byte minAlarm3 = 30

if ((RTChour == hourAlarm1) && (RTCminutes == minAlarm1)){ MorningAlarm(); } if ((RTChour == hourAlarm2) && (RTCminutes == minAlarm2)){ NoonAlarm(); } if ((RTChour == hourAlarm3) && (RTCminutes == minAlarm3)){ nightAlarm(); }

where, RTChour and RTCminutes is the time that you get from the DS1307

pleas let me know if works for you..

hi,luisfranco1990…

Thank u for helping me,
This code is working when the formet is fixed as like,–"
{byte hourAlarm1 = 8 // hours in 24h format
byte minAlarm1 = 30
byte hourAlarm2 = 17 // hours in 24h format
byte minAlarm2 = 45
byte hourAlarm3 = 20 // hours in 24h format
byte minAlarm3 = 30}"’

but sir,when i m trying to make this Resetable using Keypad,it didn’t work…

I have attach a file,please check this…
which successfully compile in Arduino but its not working in Hardware…

Thank u

Adding_Alarm.ino (18.4 KB)