Posted on

NesPi Retroflag Case Safe Shutdown Reset Power Button Mod

Check out ETAPrime’s new video: NesPi Case Safe Shutdown Reset Button Mod Power Button for the Retro Flag case using a modified version of the 8bitjunkie “easy button” script.

7 thoughts on “NesPi Retroflag Case Safe Shutdown Reset Power Button Mod

  1. hey! Great job on the retroflag script for shutting down the pi safely! I did notice that the script will ONLY work in the retroflag NESPI case. If i take the SD card out and put it in another pi, it starts to go through the startup sequence and shut itself down before it even reaches the intro video.

    When I reinsert it into the PI in the NESPI case, it works as you intended it to. Wondering if there is an easy way to disable the script if I wanted to use the SD card in another PI without the mod?

    Thanks so much!
    Matt

    1. Hm. I don’t think so. It seems like the sensible thing to do would be to use a second sd card. If you clone your existing card, you can put the clone in the retroflag, and then install the non-retroflag script. then you could use that card in a non-retroflag pi

    2. I did the same thing — the same mistake. I happen to have a Linux computer next to me when it happened, though. So I pulled the SD card, installed it into a card reader and then connected the reader to the Linux computer. From there, I was able to find and edit the files installed so they don’t work any longer. (# added comment to the line that calls the python script in the pi_shutdown within /etc/init.d)

      Fixed without re-doing the whole machine. I’ll bet a Linux LiveCD will suffice as well so having a whole Linux machine wouldn’t be needed.

    3. If you absolutely must swap your SD card seamlessly between different Pis, use pin 7 on the GPIO port instead of pin 5 for your reset switch.

      First, edit the shutdown script (/home/pi/scripts/shutdown.py) and change all references to pin 5 to pin 7. The following two lines are the ones that need to be changed.
      GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
      buttonState1 = GPIO.input(5)
      Just replace 5 with 7.
      Next, physically move the reset wire from GPIO pin 5 to pin 7.
      Now, your system should behave properly. It will safely shut down when you press reset in the modified retroflag case, but it won’t automatically shut down if it is running outside a retroflag case.

      The reason why pin 7 behaves better than pin 5 is because pin 5 is hard wired to a pull up resistor. Without the 150 ohm resistor from the nespi mod pulling it to a low state, pin 5 automatically remains in a high state, which triggers the shutdown script.

      Pin 7, on the other hand, is not hardwired to a pullup resistor. Because of this, the script can initialize it in a low state, and it won’t automatically be in a high state when it is used outside of a modified nespi case.

  2. Thank you Chuck for your cool solution. Did someone tried it out? Consider that Pin 7 GPCLK0 can also be used to to output a 1MHz+ clock signal. Is Pin 7 the only Pin that can be used? Thank you for your answer.

  3. I’m getting this error. (6) Could not resolve host: pie.8bit.junkie . Is this file not hosted by 8bit anymore?

    1. It’s pie.8bitjunkie.net

Leave a Reply

Your email address will not be published. Required fields are marked *