Report time alarm is set (serial).
This commit is contained in:
parent
57a1c1af80
commit
38c1417351
|
@ -439,7 +439,8 @@ void setup() {
|
|||
// Are there any RTC alarms set?
|
||||
DateTime alarm_two = rtc.getAlarm2(); // Get the current time
|
||||
char buff[] = "Alarm 2 set for at hh:mm:ss DDD, DD MMM YYYY";
|
||||
Serial.println(alarm_two.toString(buff));
|
||||
Serial.print(alarm_two.toString(buff));
|
||||
Serial.println(" (only accurate to day of month)");
|
||||
|
||||
// Timer example, blink main LED
|
||||
pinMode(LED_BUILTIN, OUTPUT); // set LED pin to OUTPUT
|
||||
|
@ -628,6 +629,10 @@ void setup() {
|
|||
// Use alarm built into RTC
|
||||
rtc.setAlarm2(DateTime(yourInputStartTimeUnix), DS3231_A2_Date);
|
||||
//rtc.setAlarm1(DateTime(2020, 6, 25, 15, 34, 0), DS3231_A2_Date);
|
||||
DateTime alarm_two = rtc.getAlarm2(); // Get the current time
|
||||
char buff[] = "Alarm 2 set for at hh:mm:ss DDD, DD MMM YYYY";
|
||||
Serial.print(alarm_two.toString(buff));
|
||||
Serial.println(" (only accurate to day of month)");
|
||||
}
|
||||
// else {
|
||||
// inputMessage = "No message sent";
|
||||
|
|
Loading…
Reference in New Issue
Block a user