Get out from DeepSleep without interrupt


#1

Hi everyone,
Im looking for any method to get out from DeepSleep without use interrupt. Is this possible?
Thanks


#2

You need to set one of the wake up interrupts to wake from Deep Sleep. That can be one of the Wake Up IO pins, the Alarm, or using one of the timed Deep Sleep functions, such as Dash.deepSleepAtMostSec(sec); Pressing the reset button will also wake from Deep Sleep.

In Deep Sleep the processor is basically off, with only minimum circuitry enabled to detect a wake up event. Once you call a Deep Sleep function, code execution stops, so you can’t just make a wake-up call in software.


#3

Nice. I have two sensors, one of temp and one of water level. I understand that I can activate with the sensors?
Thanks Erik


#4

If your sensors generate an IO pin pulse or level change, you can connect that to a Wake-Up capable pin on the Dash and configure it to wake up from deep sleep using attachWakeup.


#5

Can you post a very simple example of implementing a 5 second delay with deep sleep and no external interrupt?


#6

https://hologram.io/docs/reference/dash/api/#dash-deepsleepsec-sec-

Dash.deepSleepSec(5);


#7

Ok, I was hoping that was it, that is all I had done before but it seemed like when I put it into deep sleep it didn’t appear come back out, so I thought I was doing something wrong.

I think I have read that when using the deep sleep modes the serial output will not work, is that the case? Or is there another way to monitor the dash’s activity?


#8

In deep sleep the processor is completely off. The only peripherals powered are the RTC and the wake up interrupt controller.

USB is completely powered off during deep sleep, so on wake you’ll have to re-establish the USB serial connection with your host computer and terminal program. If you use Serial0 or Serial2 with a USB/Serial converter the serial output will resume immediately on wake-up since the USB device is powered by the computer.