Set up scheduled program cycles #24
|
@ -439,7 +439,8 @@ void setup() {
|
||||||
// Are there any RTC alarms set?
|
// Are there any RTC alarms set?
|
||||||
DateTime alarm_two = rtc.getAlarm2(); // Get the current time
|
DateTime alarm_two = rtc.getAlarm2(); // Get the current time
|
||||||
char buff[] = "Alarm 2 set for at hh:mm:ss DDD, DD MMM YYYY";
|
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
|
// Timer example, blink main LED
|
||||||
pinMode(LED_BUILTIN, OUTPUT); // set LED pin to OUTPUT
|
pinMode(LED_BUILTIN, OUTPUT); // set LED pin to OUTPUT
|
||||||
|
@ -628,6 +629,10 @@ void setup() {
|
||||||
// Use alarm built into RTC
|
// Use alarm built into RTC
|
||||||
rtc.setAlarm2(DateTime(yourInputStartTimeUnix), DS3231_A2_Date);
|
rtc.setAlarm2(DateTime(yourInputStartTimeUnix), DS3231_A2_Date);
|
||||||
//rtc.setAlarm1(DateTime(2020, 6, 25, 15, 34, 0), 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 {
|
// else {
|
||||||
// inputMessage = "No message sent";
|
// inputMessage = "No message sent";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user