Go Down

Topic: More than one "interrupt" in RTCZero library (Read 350 times) previous topic - next topic

Lucas1394

Hi All

Does anyone know if is It possible to use more than one interrupt in RTCZero library?


Can I use more than one interrupt for two different functions of code to run different scenarios depending upon which interrupt was registered ?

I need to send a SigFox message every hour. I am using the "alarm" of the RTCZero library to "wake up" the MKR1200 and to execute the function that reads all sensors and then send data. but meanwhile the arduino is "sleeping" sometimes I need to execute a function that increases a counter. (a pluviometer if it rains) and then sleep again until the other interruption occurs. (the one that sends data)

If anyone can help, here is part of the setup :
Code: [Select]
  rtc.setAlarmMinutes(0);
  rtc.enableAlarm(rtc.MATCH_MMSS);
  rtc.attachInterrupt(alarmMatch)//function that enables the sending of data;


And here is part of the loop :
Code: [Select]

rtc.standbyMode();


Thank you!



Go Up