Add ability to read alarm times
This commit is contained in:
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