Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wake from DeepSleep with button? #9

Closed
svenove opened this issue Aug 24, 2018 · 5 comments
Closed

Wake from DeepSleep with button? #9

svenove opened this issue Aug 24, 2018 · 5 comments

Comments

@svenove
Copy link

svenove commented Aug 24, 2018

Is there any way to wake Badgy up by using the switch, when using ESP.deepSleep()?
Like if I want the HourlyQuote-example to also update when I press the button. :)

@sqfmi
Copy link
Owner

sqfmi commented Aug 25, 2018

Hi @svenove! Unfortunately no, the ESP8266 does not support GPIO interrupts to wake from deepsleep. The only way to wake the ESP8266 is to perform a power cycle (e.g. slide the power switch up and down) or by pulling the reset pin low.

@svenove
Copy link
Author

svenove commented Aug 25, 2018

@sqfmi That’s what I thought, hmm...
What battery life can be expected when always awake? Like in the Spotify-example. I would expect that not using deepsleep has a huge impact on battery life?

@gordonendersby
Copy link

Would be great if you could break out the reset pin or have pads that a momentary switch could be soldered on to.

In the meantime you could add your own push switch to the reset pin with a bit of careful soldering.
and mount the switch on whatever you are housing the badgy in.

@svenove
Copy link
Author

svenove commented Aug 26, 2018

I guess calling wifi.stop() would reduce power consumption? At least if not reconnecting too often (as reconnect probably uses a bit more than keeping connected?).

So instead of deep sleep, I could disconnect from WiFi instead?

Any other tips for reducing power consumption? :)

@sqfmi
Copy link
Owner

sqfmi commented Aug 26, 2018

Instead of deep sleep, you could also try "light sleep" mode which still allows you to wake on interrupt, and consumes ~1mA (according to documentation. Check out this thread for some code snippets and details: esp8266/Arduino#1381

@sqfmi sqfmi closed this as completed May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants