Advice: Emulation Station Safe Shutdown via GPIO input
-
Hi Guys, my first post on the forum!
I'm building a bar top arcade machine for my back garden pub. I currently have a Pi 3B running Damaso's Extreme 128GB image which will be going into it. All the buttons, joysticks and switches are running through USB joypad controllers which seem to work great, the only thing I'm missing at the moment is a safe shutdown switch. It bothers me that there is a risk of corruption by pulling the plug. I know emulation station can be shut down in the home screen menu, but I would like to fit a shutdown switch on the front panel for convenience. My GPIO pins are unused on the Pi so I'm thinking of connecting a push button to one of the inputs to start a safe shutdown script.
I'm a noob when it comes to scripts lol! Just wondering if someone could help me with this part, I have looked this up on Google but it tends to point me towards pi cases with the buttons built into them and tutorials in Raspbian OS which confuse me as I'm running RetroPie.
A switch to simply shutdown emulation station so it's safe to pull the power is my main objective, however if it's simple enough to configure an output for either a 3.3v or 5v LED to indicate shutdown is complete, that would be an added bonus! I have some push buttons with LED built into them.
Cheers guys!
Dan
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.