Add ability to read alarm times
This commit is contained in:
1 parent
a83671bda5
commit
966af1d5cf
2 files changed
+7
-1
No files matched your search
+1
-1
Submodule ds3231/ds3231 updated: dfd2289aef...21f9215bba.
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user