Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enter code here
- void main(){
- ...
- //set alarm at 16:0:0 and trigger Event_1 at interrupt time
- rtc.enableAlarm(16,0,0);
- rtc.attachInterrupt(Event_1_isr);
- ...
- }
- void Event_1_isr()
- {
- ...some code...
- //Set next alarm and interrupt Event_2
- rtc.setAlarmTime(16, 0, 15);
- rtc.enableAlarm(rtc.MATCH_HHMMSS);
- rtc.detachInterrupt();
- rtc.attachInterrupt(Event_2_isr);
- }
- void Event_2_isr(){
- ...some code...
- //I guess you get the point
- rtc.setAlarmTime(16, 0, 30);
- rtc.enableAlarm(rtc.MATCH_HHMMSS);
- rtc.detachInterrupt();
- rtc.attachInterrupt(Event_3_isr);
- }
Add Comment
Please, Sign In to add comment