I have built the following circuit to power my esp8266. And it works fine.
When you press the button esp8266 turns on, and by setting D1 high it still has power even if the button is released. When I do things with my code I set D1 low and esp8266 shuts down.
But in my application when the button is pressed it will stay pressed for some time. I want esp8266 to shut down all circuits whether the button is released or not. If the user releases the button and presses it again esp8266 should power on again.
But in this circuit, if the button is still pressed after esp8266 does its job and sets D1 low, the circuit remains powered.
What can I do to make esp8266 power down even button is still pressed?
I don't want anything with software, sleep mode, etc, I need to solve this with electronics.