Add ability to read alarm times
This commit is contained in:
parent
a83671bda5
commit
966af1d5cf
@ -1 +1 @@
|
||||
Subproject commit dfd2289aefcf71238e55344084716943033e5101
|
||||
Subproject commit 21f9215bba1d19e15bd2d6a79f8bff6a050b3c7a
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user