Go Down

Topic: More than one "interrupt" in RTCZero library (Read 360 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!

Lucas1394

#1
Mar 25, 2019, 01:16 pm Last Edit: Mar 25, 2019, 01:19 pm by Lucas1394
I have already solved the problem.

It is possible to add more interrupts from the ArduinoLowPower library.


Does anyone know if you can get the actual date and time from sigfox?
Is it possible to delete forum posts?

I put the same post twice by mistake.

Thank you!

Go Up