I'm using an ESP-12F to fire off mqtt messages when a button is pressed. The circuit works as expected; the physical button resets the device which boots, runs the code and deep sleeps indefinitely. I want to add more than one button (or external trigger) but I want to know which one woke the device up. I attached multiple momentary buttons to the circuit and they all do the job of reseting the device but I was unable to capture which button was pressed.
The yellow line is my button press (drives reset low), it takes about 150ms. The blue is a simple digitalWrite in the setup method of a blank program. It appears the ESP12 takes about 250ms to boot up into setup where I could read the pin but by then the button has returned to it's original state. Is there an easy way to extend the low so it can be read by the IC?
This is also an empty program, once I add libraries etc it adds another 50-100ms just to get to setup so I would probably have to extend the button state to say 400ms to be safe.
Edit: So an issue with this design is that if I hold the button low to try and capture it since it's connect to reset it doesn't actually reset. I need to "capture" the low and then release but then read it after startup.
Edit: Blue is connected to an LED on a GPIO. I'm using this to basically see when the program is in setup() by switching this high. The yellow line is the reset pin, the initial low resets the device and then when I release the button it returns to high via a pullup.