RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Best Practice GPIO shutdown switch

    Scheduled Pinned Locked Moved Help and Support
    shutdowngpio controllergpiopi 3
    3 Posts 3 Posters 426 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MaMikeeM
      MaMikee
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        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.

        cyperghostC 1 Reply Last reply Reply Quote 1
        • cyperghostC
          cyperghost @mitu
          last edited by cyperghost

          @mitu There is no modification needed at all you can use multi-switch --generic command to offer an easy setup.

          @MaMikee Please install raspi-gpio at first with sudo apt install raspi-gpio command. There are tons of other possibilities available ;)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          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.