Confirming that I can't set an alarm more than a month in advance (or maybe ~2 months if the current month has 30 days and the next month has 31 days, and you set it for the 31st). Wild.
https:/…
Feel slightly better:
yourInputTime: 1694187947
RTC can't set time. Trying again.
UTC time from browser: 2023/9/8 (5) 15:45:47
rtc.now().unixtime(): 1694187947
Writing file: /inputFloat.t…
I can set Alarm2 and have SQW notify of the alarm. I tried
- setting, turning off the ESP32, waiting past alarm time, and it does not trigger on boot (this is good)
- setting, rebooting ESP32,…
I tried the same if ((rtc.alarmFired(2) == true) )
code on the breadboard version and get the same results (crash on form submission).
Changed true
to 1
and it is not crashing.
Also, even though I get stuff like this, the RTC time seems to be right:
Writing file: /inputMsg.txt
- file written
yourInputTime:…
It's this bit that's causing the i2cCheckLineState()
error and reboot:
if ((rtc.alarmFired(2) == true) ){
// Print current time and date
DateTime now = rtc.now(); //…
I'm getting weird dates again. I will look at the hardware connections tomorrow.
It's also worth considering using the SQW pin: https://garrysblog.com/2020/07/05/using-the-ds3231-real-time-clock…
RTC alarms seem to fire at the next opportunity, even if they happened when ESP32 was off. This is a problem I wanted to avoid.
Reset the alarm in setup()
if it's in the past?
OK, so it looks like arduino-timer .at()
uses the millis()
clock. Are there timers that use real time?
Still not working. May need to try AsyncIOScheduler
, which I think is where the error is coming from.
Going to wait and see if this error causes any problems or not. Although I'm not sure why this would happen if I'm calling ki.stop()
.
2023-09-07 08:31:32,558 - Scheduler started
2023-09-…
Replaced BlockingScheduler
with BackgroundScheduler
per https://apscheduler.readthedocs.io/en/3.x/userguide.html#choosing-the-right-scheduler-job-store-s-executor-s-and-trigger-s.