Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    GPIO ONOFF Powerswitch / Resetbutton Problem

    GamePad/GPIO/USB encoder
    gpio onoff powerswitch resetbutton
    5
    35
    10920
    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.
    • megakoni
      megakoni @supernature2k last edited by

      @supernature2k i still get the power button triggered with pluging something into usb or audio jack and it shuts down. This only happens when the system.power.switch=PIN356ONOFFRESET script is enabled. So i was wondering if there is a new script for power and reset function since the new update

      supernature2k 1 Reply Last reply Reply Quote 0
      • supernature2k
        supernature2k @megakoni last edited by

        @megakoni no sorry, the fix is ready and should be in the next release.
        Meanwhile, you can try the script posted above.

        Pi powered NES | Gameboy HD | RecalStation | RecalDrive
        Upvote messages if it has been useful ;)

        megakoni 2 Replies Last reply Reply Quote 0
        • megakoni
          megakoni @supernature2k last edited by megakoni

          @supernature2k ok thanks i'll wait then. I tried to implement (i'm a noob xD) the script but it didn't seem to run, so i don't know yet if it works

          1 Reply Last reply Reply Quote 0
          • megakoni
            megakoni @supernature2k last edited by

            @supernature2k so i got the new update.
            Can you explain me how exactly the new power switch works? Reset button is i guess like 3 seconds of pressing down to reboot.
            But i don't know exactly how the power switch works to turn off.
            Turning on is simple, just switch it to on.
            But turning off it seems i have to switch 3 times, but sometimes it does not work.
            Is there a specific period of time i have to wait for the 3 times switching?

            unik314r 1 Reply Last reply Reply Quote 0
            • unik314r
              unik314r last edited by

              Also interrested here: looks like my power and reset buttons doesn't work anymore since the last update (X-MAS update)
              Any hints?

              1 Reply Last reply Reply Quote 0
              • unik314r
                unik314r @megakoni last edited by unik314r

                @megakoni said in GPIO ONOFF Powerswitch / Resetbutton Problem:

                But i don't know exactly how the power switch works to turn off.

                Well I managed to find out by myself: POWER button works the exact same way as RESET button: when Recalbox ON, push the power button during 3 seconds, release it --> shutdown launched.

                So according to me, you don't have to push the button 3 times.

                EDIT: to show they work the same way: they have the same code line:

                # grep GPIO.add_event_detect /recalbox/scripts/rpi-pin356-power.py 
                GPIO.add_event_detect(RESETPLUS, GPIO.BOTH, callback=button_pressed, bouncetime=2)
                GPIO.add_event_detect(POWERPLUS, GPIO.BOTH, callback=button_pressed, bouncetime=2)
                
                
                megakoni 1 Reply Last reply Reply Quote 0
                • megakoni
                  megakoni @unik314r last edited by megakoni

                  @unik314r but i have a power switch, not a button. My Reset trigger is a momentary button. for power i use a switch (i build my raspberry into a snes case)
                  and i use the system.power.switch=PIN356ONOFFRESET that was commented in the recalbox.conf.

                  And by the way, how and where can i find this script? And can i simply edit it?

                  unik314r 1 Reply Last reply Reply Quote 0
                  • NeeeeB
                    NeeeeB last edited by

                    Have a look here :
                    /recalbox/scripts/

                    Vieux geek ^^
                    GameList Editor : https://github.com/NeeeeB/GameList_Editor

                    1 Reply Last reply Reply Quote 0
                    • unik314r
                      unik314r @megakoni last edited by unik314r

                      @megakoni To edit a file: have a look at https://github.com/recalbox/recalbox-os/wiki/Edit-the-config.txt-file-(EN)
                      The file you're looking for is /recalbox/scripts/rpi-pin356-power.py .

                      --
                      I Also use a modified SNES but don't like switch buttons (Recalbox python script looks for a status change --> going from on to off is the same as going from off to on and I find it not very convenient)
                      So I turned the original power switch button into a momentary one (inside the SNES, a simple spring makes the button go back) so that when I want to turn on (or off) the SNES, it pushes a momentary button (that I glued inside the snes) and automatically comes back: that way, even if there is a general power cut and then power restored (or something else that electrically unplugs/plugs the SNES), the system doesn't boot with a power button positionned to off.

                      But I suppose this is not what you're looking for^^

                      megakoni 1 Reply Last reply Reply Quote 0
                      • megakoni
                        megakoni @unik314r last edited by

                        @unik314r thanks for the info. I also thought of glueing a button in the inside, so the "switch" then just bounces back.
                        But i think i stay with the switch. I just really enjoy that satisfying click sound and feel of using that original switch.
                        Then i'll just have to shut down switching 3 times or using the menu command. At least i get no shut downs anymore when i plug in something to usb etc.

                        unik314r 1 Reply Last reply Reply Quote 0
                        • unik314r
                          unik314r @megakoni last edited by

                          @megakoni I agree with you, the switch sound is oddly satisfying 😄 But I have it on my original non-modified SNES 😄 😄

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

                          Want to support us ?

                          69
                          Online

                          99.6k
                          Users

                          28.1k
                          Topics

                          187.1k
                          Posts

                          Copyright © 2021 recalbox.com