Self powering off an Arduino

Hey Guys,
I have a quick question. I got an arduino or esp running off a battery and I want to have a button that turns the power source to the arduino on and I want to turn the arduino off by doing a digital write.

What would be the best component to do such, a relay etc?
Thanks,
Luis

What should I search for if I want to find such a thing, which by the way looks great for my problem, on any other platform like on Amazon, I am ordering some other parts so I want to get everything from the same reseller.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.