Wake on time

Posted on
  • Hello everyone,

    I plan to let my Espruino wake up on a specific alarm time. In the meantime the board should be ideally in deep sleep mode.

    Is there a better way to realize that instead of waking the board by an interval to check the time frequently?

    Maybe there could be a feature "setWatchTime" in the future.

    Best,

    Tobias

  • Why not use setTimeout()?

  • You mean to calculate the milliseconds to be in sleep mode until the next alarm comes up? Could be an idea.

  • Yes, that'd be what I'd suggest. It should be really easy to do - simplest is just (timeToWake-getTime())/1000

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Wake on time

Posted by Avatar for net-tobi @net-tobi

Actions