Interrupt or other solution to run code when time seconds changes
-
Working on a Dial project in Arduino IDE... Looking at the schematics, I note that the RTC INT signal is hardwired to the power rail so the RTC can wake the device when an alarm triggers. I believe most other M5Stack controllers with RTC share the same design.
But without access to RTC interrupt, what is the best way to trigger code to run when time seconds change? I guess I could create a loop with a small delay and keep checking for Seconds variable to change, but that seems a bit wasteful. Is there some way to know exactly when the time seconds updates? The issue is not the timing of one second, my requirements need to know when UTC time seconds change in order to perform a task as close to exact time as possible.
EDIT - similar question would be how to know when RTC alarm is triggered?
Thanks