I am trying to read the alarm that is set in my Arduino real time clock (RTC), but for some reason rtc.getAlarmHour() and rtc.getAlarmMinute() don't seem to work. I had them working before, but I'm not sure what changed. I am using Arduino Uno. The following code just returns "Next Alarm: 0:0".
#include <Rtc_Pcf8563.h>
Rtc_Pcf8563 rtc;
void setup(){
rtc.clearStatus();
rtc.setAlarm(byte(rtc.getMinute())+2,byte(rtc.getHour()),99,99);
Serial.begin(9600);
printAlarm();
}
void loop(){
}
void printAlarm(){
Serial.print("Next Alarm ");
Serial.print(rtc.getAlarmHour());
Serial.print(":");
Serial.print(rtc.getAlarmMinute());
}