I am trying to build what I thought was a relatively simple system (think deadbolt detector), that will fire an event when a simple switch changes state.
Currently, I am testing with an ESP-01 and an ESP32, using deep sleep but the power consumption still seems quite high, because I have to wake the device up every 10 seconds to query the status of the "switch".
I would like to only wake from sleep when the state changes, I can "easily" do this on "close", but I would like to do this on "open" as well like in this question. I need a switch that not only detects open/close, but also sends a pulse to wake up an ESP8266 whenever the (debounced) state changes
I have read up on XOR/XNOR gates, but I am still not sure, how I would implement it.