ArduinoLowPower and RTCZero

Hi,
I need to use RTCZero to create a daily alarm based on RTC time and I need to use ArduinoLowPower lib to create a short sleep of 10 seconds in loop.
Why do not work ?

#include <RTCZero.h>
#include "ArduinoLowPower.h"

RTCZero rtcZero;

const byte rtcZero_seconds = 0;
const byte rtcZero_minutes = 22;
const byte rtcZero_hours = 14;
const byte rtcZero_day = 15;
const byte rtcZero_month = 3;
const byte rtcZero_year = 21;

void setup() {
  
  Serial.begin(9600);

  rtcZero.begin(); // initialize RTC 24H format
  rtcZero.setTime(rtcZero_hours, rtcZero_minutes, rtcZero_seconds);
  rtcZero.setDate(rtcZero_day, rtcZero_month, rtcZero_year);
  rtcZero.setAlarmTime(14, 22, 30);
  rtcZero.enableAlarm(rtcZero.MATCH_HHMMSS);
  
  rtcZero.attachInterrupt(alarmMatch);

}

void alarmMatch()
{
  Serial.println("Alarm Match!");
  
}

void loop() {
  
 //Serial.println("TESTE");
 LowPower.sleep(10000);

}

Best Regards

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.