Deep Sleep with wakeup and timer

System.sleep(A4, RISING, 60, SLEEP_MODE_DEEP);

I am trying to use Deep Sleep with a firmware for a product. For some reason it’s not letting me use the above line. I need the deepest sleep possible with a rising wakeup on A4. I need to be able to set the amount of time to sleep. I also need it to wake up at the top of the loop() not the setup.

  1. This is not how you put a device into deep sleep
  2. Waking from deep sleep is (currently) only possible with a rising edge on WKP
  3. Deep sleep will always execute setup() after wake, if you don’t want that, you either need to programatically skip setup() or use Stop Mode Sleep
1 Like