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

    Help Making Power Button with Latching Button

    Scheduled Pinned Locked Moved Help and Support
    power buttonlatchingpi 3 b+
    4 Posts 3 Posters 965 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.
    • S
      saddlepiggy
      last edited by

      Hello! I got all of the electronics I need for an cocktail table (with a Pi 3 B+), except I bought a latching power button instead of a momentary power button, making it kind of difficult to make one easily with GPIO pins.

      When I hit the button the first time, it needs to power it on. At that point the buttons is latched, so when I hit it again, it needs to shutdown properly, as not to corrupt anything

      I don't want to wire it into the PSU cord because then it could cause corruption (right?).

      I think this could be done pretty easily via a script, but I don't know how to implement one into RetroPie. Also I would prefer it to not need a script, but it's not an issue if it makes it work.

      Does anyone know any ways to make this work without buying a new button?

      Thanks, saddlepiggy

      cyperghostC 1 Reply Last reply Reply Quote 0
      • stoney66S
        stoney66
        last edited by

        I used a script and a switch from mausberry circuits works great.

        https://mausberry-circuits.myshopify.com/pages/setup

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

          @saddlepiggy You can use the Multi Switch Shutdown Script and call it with --generic parameter. Then you have a basic on/off switch. It does not matter if it's latching or a momentary switch type.

          You can also use the device @stoney66 suggested, with the same script but with parameter --mausberry (imho a very good device). Works also with two types of power switchs (latching or momentary)

          S 1 Reply Last reply Reply Quote 0
          • S
            saddlepiggy @cyperghost
            last edited by

            @cyperghost Awesome thank you! I will definitely go with your solution!

            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.