🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Interrupt or other solution to run code when time seconds changes

    Arduino
    1
    1
    139
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TomKattT
      TomKatt
      last edited by TomKatt

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post