• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 11 Jul 2018, 23:59

    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

    C 1 Reply Last reply 12 Jul 2018, 03:45 Reply Quote 0
    • S
      stoney66
      last edited by 12 Jul 2018, 01:08

      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
      • C
        cyperghost @saddlepiggy
        last edited by cyperghost 7 Dec 2018, 04:45 12 Jul 2018, 03:45

        @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 12 Jul 2018, 22:04 Reply Quote 0
        • S
          saddlepiggy @cyperghost
          last edited by 12 Jul 2018, 22:04

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

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            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.

            This community forum collects and processes your personal information.
            consent.not_received