Best Practice GPIO shutdown switch
-
Did an exhaustive search for the best way to do this and saw a bunch of "OUTDATED" notices on posts, so...
I'm using the GPIO joystick interface for an Atari game (no EmulationStation) and would like to save high scores and shutdown PI.
Any suggestions on the best steps to do this?
Thanks,
Mike in snowy Colorado
-
If your start-up script executes just the Atari emulator, then you can add a 'shutdown' command in the script, right after the emulator command, so that when you exit the emulator, the system would stop.
If you'd like to use a GPIO button to shutdown the Pi system, then you can modify @cyperghost's shutdown script (https://github.com/crcerror/ES-generic-shutdown) and run it on system start to monitor a GPIO for a button press. The usual GPIO used for shutdown/start is GPIO3, since it can be used to start the PI - assuming you're using a 2 or 3B+ model.
-
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.