JChristensen / DS3232RTC

Arduino Library for Maxim Integrated DS3232 and DS3231 Real-Time Clocks
GNU General Public License v3.0
392 stars 135 forks source link

Alarm 1 and 2 #97

Closed hoseinaghajari closed 2 years ago

hoseinaghajari commented 2 years ago

Hi dear @JChristensen . This (https://github.com/JChristensen/DS3232RTC/blob/master/examples/alarm_ex6/alarm_ex6.ino) is the code which run for me correctly but I have a question. I come to think that if I just use Alarm1, there would be some problems so according to my experiences we should use both Alarms. so How could I change that code to disable correctly Alarm2 and to set Alarm1 every 5 minutes?

JChristensen commented 2 years ago

Hello Hossein,

A combination of Example 3 and Example 6 should do the trick. Example 3 sets Alarm1 to occur at a given interval and disables Alarm2. Combine that idea with the interrupt code in Example 6.

Have a look and if you're still stuck, let me know.

Regards ... Jack

JChristensen commented 2 years ago

Nothing heard; closing issue.