On/Off switch and Retropie

Tagged: 

This topic contains 6 replies, has 6 voices, and was last updated by  alegeobla 2 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #101135

    mheyman
    Participant

    Hello everyone,

    I’ve been looking for a safe on/off switch for my raspberry pi 2 which is running retropie. I was wondering if anyone had luck with any of these.

    Pi Supply Switch – On/Off Power Switch for Raspberry Pi


    http://lowpowerlab.com/atxraspi/
    http://mausberry-circuits.myshopify.com/

    They all use scripts that safely shut down the Raspi, I just want to make sure they are compatible with a Raspi running retropie.

    Let me know if anyone has any experience with an on/off switch.

    #101136

    herbfargus
    Member
    #101139

    mheyman
    Participant

    Ah thanks for posting that, I’ll have to check it out too! I am planning on using a momentary push button to power on/off my pi (building an arcade stick). Does the control block only work with a toggle switch?

    #101140

    I have experience booting a pi2 and exiting emulators using a push button. The code I link to below could easily be adapted to shutdown the system as well. A toggle isn’t necessary, just a momentary push button is all that’s required.

    All you need is a push button connected to gpio3. You may have problems shutting down your emulators if you use a script running shutdown -h now all by itself. I suggest for you to check out THIS post.

    That piece of code shuts down the emulators gracefully so you don’t lose hi scores and it properly saves SRM’s

    You could add the following code to the code in the link detailed above

    sleep(10)
    os.system('shutdown -h now')

    Insert that code right after
    device.emit(uinput.KEY_ESC,0)

    In config.txt under /boot , add the line
    avoid_safe_mode=1

    That button will then boot up your pi and shut down your system and emulators gracefully.

    #101153

    InsecureSpike
    Participant

    i’d recommend no to the PiSupply!

    edit:
    it may be my lack of linux knowledge but it didn’t seam to send enough power though to the pi, which ended up in constantly getting the coloured square showing most of the time!

    #101156

    labelwhore
    Participant

    It’s super easy to make a switch. You only need a SPST NO switch and a pull up resistor.

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    #101243

    alegeobla
    Participant

    MAUSBERRY!

    I use it, its perfect. I bought the “use your own switch” and have it wired to an original nintendo switch. It does a complete perfect shut down. I wouldnt use anything else myself (I’m building a SNES currently and will be using it there too).

    Only gripe I have, which probably is with all switches, is that it doesnt exit emulationstation before running the shut down command, so although the game saves save, the meta data (play count, etc.) doesnt. I believe if you add to the switch’s shut down command “kill emulationstation” it will work, but I havent played with that yet

Viewing 7 posts - 1 through 7 (of 7 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

PLEASE NOTE: All orders that are placed between January 14th and January 28th will be shipped on January 29th. Dismiss