I'm building an IR to wifi bridge using an esp8266. Basically I'm building an IR receiver connected to an esp8266 inside an IR remote control, to forward received IR Remote keypresses over wifi to a server. I'm using a Wemos D1 Mini.
I already have the IR decoding and network forwarding part working, but it is always on, which uses a lot of battery, especially considering that 99% of the time no buttons are being pressed.
I want it to go into deep sleep when a button hasn't been pressed for a certain time.
If I connect the IR receiver to the RST pin, that can wake the esp up from deep sleep, but the problem with that is that it will keep resetting the esp over and over as the IR keeps coming in, which will make the esp unable to actually decode the IR commands because it is continually being reset.
I need it to wake the esp up from deep sleep via RST, but then to ignore further RST activations until I programmatically send it into deep sleep again.
What I really need is a proper gpio interrupt so I can ignore further resets until I go to deep sleep, but AFAIK esp8266 doesn't support gpio interrupt wake from deep sleep.
I need some kind of resettable one-shot trigger to only issue one reset until you tell it that you're going to sleep again.
I'm not sure how I'd be able to implement this? Anyone have any ideas? I would rather not have to use another external microcontroller just to reset the esp8266, also space is tight inside the remote control so I'd rather not have to use a lot of external parts.