0

I need to publish state of a switch (1/0) to an MQTT broker. I am planning to put it to deepsleep since this is a battery operated application. Is there a way to awake ESP8266 from deepsleep using external interrupts?

When the state of the switch changes, ESP awakes and transmits switch state to MQTT broker. After that it again goes to deepsleep.

I found no information about external interrupts in ESP. As I got to know, only clock is ON during deepsleep and not sure whether my goal is feasible. If not, I would be glad if you can please suggest an alternative for this (using ESP).

Lakmal

Lakmal Premaratne
  • 1,159
  • 7
  • 18
  • 34
  • I'm voting to close this question as off-topic because it is about electronic circuitry rather than programing. – Fraser Oct 20 '16 at 16:14

2 Answers2

1

Sure, see the discussion here, basically if CH_DP goes high the chip wakes up.

Fraser
  • 15,275
  • 8
  • 53
  • 104
0

You can also try my solution here. I use one transistor to enable interrupt to reset after ESP wakeup from deepsleep.

Tomsim
  • 369
  • 3
  • 7