-->
Page 1 of 2

Waking up from deep sleep

PostPosted: Thu Jun 25, 2015 5:46 am
by Malfunction
According to my understanding, there are two ways to wake up from deep sleep:

setting a timer (ESP.deepSleep(time in uS, mode)). GPIO16 must be connected to the external reset pin for that work.
pulling down the external reset pin

Isn't there a way to wake up the chip using the GPIOs, with something like, say, a pin interrupt? Using the external reset pin isn't a great choice, because it will reset the chip even if it isn't sleeping (if, for example, I connect a motion sensor to the reset pin, the chip will be reset every time motion is detected, not only when the chip is in deep sleep).

Re: Waking up from deep sleep

PostPosted: Thu Jun 25, 2015 5:58 am
by tytower
You would connect the motion sensor to a pin and have code that is run by interupt when triggered I would say . Deep sleep starts the chip from scratch . Interupts dont and there are quite a few ways to sleep during running . See the wiki above

Re: Waking up from deep sleep

PostPosted: Sat Jun 27, 2015 3:21 am
by Malfunction
I'm sorry, but I don't understand what you're trying to say.

You're suggesting that I try running code with an interrupt. What exactly do you mean by that? Are you suggesting that I use something other than deep sleep mode?

Re: Waking up from deep sleep

PostPosted: Sat Jun 27, 2015 8:09 am
by martinayotte
tytower wrote:You would connect the motion sensor to a pin and have code that is run by interupt when triggered I would say . Deep sleep starts the chip from scratch . Interupts dont and there are quite a few ways to sleep during running . See the wiki above


This guy simply doesn't know any things about what he is talking ...
During deep-sleep, interrupts wont be served at all !!! The only way to go out of deep-sleep is to have a reset.