Add ability to read alarm times

This commit is contained in:
BlackMark 2020-05-17 20:07:13 +02:00
parent a83671bda5
commit 966af1d5cf
2 changed files with 7 additions and 1 deletions

@ -1 +1 @@
Subproject commit dfd2289aefcf71238e55344084716943033e5101
Subproject commit 21f9215bba1d19e15bd2d6a79f8bff6a050b3c7a

View File

@ -173,6 +173,12 @@ int main()
if (receivedByte == 's') {
const auto newDate = receiveTime();
ds3231.setDateTime(newDate);
} else if (receivedByte == '1') {
const auto alarm = ds3231.getAlarm1();
serial << F("Alarm1: ") << alarm << F("\r\n");
} else if (receivedByte == '2') {
const auto alarm = ds3231.getAlarm2();
serial << F("Alarm2: ") << alarm << F("\r\n");
} else
serial << F("Invalid input: ") << static_cast<char>(receivedByte) << F("\r\n");
}