Hello, I know it has been discussed a lot but I would still like to ask how to do this:
- Initially the battery is disconnected from Arduino.
- When I press button, Arduino wakes up and runs the code.
- At the end of the code Arduino "powers off" the button and again battery is disconnected.
I am not sure but maybe there is somekind on electro-magnet that I could use. When I push the momentary button, the electromagnet magnetizes and switches on power using reed-switch. After Arduino turns some GPIO to LOW state, the electromagnet loses magnetism and reed-switch disconnects battery.