I have an ESP8266, and a MCP23008 I2C GPIO expander.
The GPIO expander has the ability to trigger an interrupt when a pin changes - this is handy, as it means we can do something when an input pin changes (in my case, when a doorbell button is pressed or the door is opened and a reed switch activates).
The ESP8266 has 'deep-sleep' mode, which normally you wake from by the RTC activating the RESET pin by wiring the two pins together (through GPIO16). Sleep is probably an optimistic word, as actually it's more like shutting the chip down entirely - when you hit the RESET, you boot from scratch.
My thought was to hook up the INT output of the IO expander to the RESET pin - in order to wake from sleep when something happens. However, the INT pin remains active until the register is read - if I am holding the ESP8266 in reset, that'll never happen!
Would a valid solution that works with the vagaries of the ESP8266 be to make a basic one-shot MOSFET monostable circuit to fire when the INT pin is active?
No comments:
Post a Comment