Hi i am using an Autonomo + GPRS Bee, with RTCZero library i am able to put it to sleep and wake up every 15 mins and post something to thingspeak, but after exactly 4 x 15min successful cycles the Autonomo ceases cycling (and nothing is posted, of course). If i reset it it starts working again … Any ideas? my code is something like this:
> //Alarm & Deep Sleep
> #include <RTCZero.h>
> RTCZero rtc;
> uint8_t seconds = 0;
> uint8_t minutes = 00;
> uint8_t hours = 00;
> volatile bool rtc_flag = false;
> //********************************
> void setup()
> {
> // Time and alarm setup, start
> rtc.begin(true);
> rtc.setTime(hours, minutes, seconds);
> rtc.setAlarmTime(00,minutes,00);
> rtc.enableAlarm(rtc.MATCH_MMSS);
> minutes+=1;
> rtc.attachInterrupt(alarmMatch);
> // *************************************
>
> while ((!SerialUSB) && (millis() < 10000));
> SerialUSB.begin(115200); // Open serial connection to report values
> SerialUSB.println("Starting up");
>
> //GPRSBee init
> //Start the Bee Serial port initially
> Serial1.begin(57600);
>
> //Switch on the VCC for the Bee socket
> //digitalWrite(BEE_VCC, HIGH);
> gprsbee.initAutonomoSIM800(Serial1, BEE_VCC, BEEDTR, BEECTS);
> gprsbee.setDiag(SerialUSB);
> //***************************************************
> }
> void loop()
> {
> {
> if(rtc_flag)
> {
> rtc.disableAlarm();
> minutes+=15;
> rtc_flag = false;
> DO send data to thingspeak
> rtc.setAlarmTime(00,minutes,00);
> rtc.enableAlarm(rtc.MATCH_MMSS);
>
>
> }
> rtc.standbyMode(); // Sleep until next alarm match
> }
void alarmMatch()
{
rtc_flag = true;
}