This is a electronics assembly guide for those who wish to skip the NFC Reader but still want the front buttons and LED to be functioning. This guide will help you setup the safe shutdown and game reset scripts. You will need the custom usb extender board, front pcb board, and other misc parts. Purchase links are below.
After completing this guide, you can always upgrade your Mini NES to add a NFC Reader.
Damage Warning! If you have an SD Card installed in the Raspberry Pi, remove it now!
The 3D Printed Case has a defect that will snap in half the SD card when the Raspberry Pi is inserted OR removed from the Mini NES Case.
You will have two almost identical switches for the Front Panel PCB. Do NOT solder the switches onto the PCB yet! Click the switches up and down to figure out which is the Latching Pushbutton Switch and which is the Momentary Pushbutton Switch.
The Latching Pushbutton Switch is the POWER button.
The Momentary Pushbutton Switch is the RESET button.
Tip: The fit of the switches and the button covers will be very snug and may take several tries, but they will fit with a bit of force.
Set the Front Panel aside for now, do NOT glue into the Mini NES Case yet.
The USB Extender is now assembled. You may re-install the Raspberry Pi into the Mini NES Case.
Note: The use of GPIO3 is important for the Power Switch. The software script takes care of shutdown/halt of the Raspberry Pi. GPIO3 has a hardware feature built into Raspberry Pi that wakes up from halt when shorted to Ground.
There are vents on the Mini NES Case, however, if you want to have play sessions of longer than a few minutes eventually you will want to add an active cooling fan. Wire the fan into the Raspberry Pi power, it will be always running.
With the Front PCB wired into the Raspberry Pi, you will need to install the safe shutdown and enable the Power LED.
import RPi.GPIO as GPIO import time import os GPIO.setmode(GPIO.BCM) GPIO.setup(3,GPIO.IN, pull_up_down=GPIO.PUD_UP) while True: if (GPIO.input(3) == True): os.system("sudo shutdown -h now") break time.sleep(0.50)
Note: If you are using a momentary button instead of a latching button for the Power Button, you must update the script to watch for False instead of True.if (GPIO.input(3) == False)
You may also have to make this change if your switch is mounted backwards.
sudo nano /etc/rc.local
(sleep 1; python /home/pi/NESPi/shutdown.py)&
Power Indicator LED
Note: Depending on your retroarch version, you may not see the same menu options. Try "Interfacing Options" -> "Serial"
import RPi.GPIO as GPIO import time import os import socket GPIO.setmode(GPIO.BCM) GPIO.setup(4,GPIO.IN, pull_up_down=GPIO.PUD_UP) # Sends "RESET" message to port 55355 for RetroArch's network commands while True: if (GPIO.input(4) == False): print "Reset button pressed.\n" try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.sendto("RESET", ("127.0.0.1", 55355)) except socket.error: print "Failed to create socket" time.sleep(0.50)
sudo nano /etc/rc.local
(sleep 1; python /home/pi/NESPi/reset.py)&
sudo nano /opt/retropie/configs/all/retroarch.cfg