RecalBox: Add a pushbutton to turn properly

you know very definitely Recalbox, available as open source dedicated to the retrograming and BONE which transforms our favorite raspberry console games.
For the more adventurous who want to go further and take advantage of the resources of the Raspberry Pi, it is possible to add a button to turn on and turn off your console properly! But how?


  • a Raspberry Pi with the Recalbox OS installed on your micro SD

  • a map of prototyping

  • 2 jumpers (wire equipped with connectors male/female)

  • button on the

which button to use?

you can add a power button to start/stop your RecalBox since version 4.0 beta 3. The button can be either a push button or a button power off or switch to lock.
Note on the push buttons: some GPIO have resistors pull-up built-in (resistors connected to the + 3.3V), so it is preferable to use switches normally open (abbreviated NO) with these pins.

to connect the switch to the Raspberry Pi GPIO, plug a PIN on the GPIO3 (PIN GPIO No. 5 above on the left) and another on the mass located just to the right on the right (PIN GPIO N ° 6):

Activation of the switch

so that your switch is taken into account by RecalBox , you must enable this feature in shader , by adding / uncommenting one line:

  • System.power.switch = PIN56ONOFF for an A/M switch

  • System.power.switch = PIN56PUSH for a button

your RecalBox can now be turned on/off with a button!

even better

since RecalBox 4.0 beta 4, there is another option that allows you to also add a switch and a power indicator light:

in shader , add / uncomment the following line:

System.power.switch = PIN356ONOFFRESET

the power button works only with an A/M switch to lock. In this configuration it is wired as above between the GPIO3 and the mass.

of RESET button works that with a push button and must be connected to the GPIO2 (PIN N ° 3 upper-left) and the same mass as the A/M switch (PIN N ° 6).

the power LED is connected with the anode (+, long PIN) to the GPIO14 (PIN No. 8) and cathode (-, short PIN) to ground (PIN N ° 6).

the GPIO14 provides a 3.3V so if you have an LED that requires less than 3.3V (most red, orange, yellow and green LEDS) you need to add a resistor between the anode of LED (+) and the GPIO14, to avoid destroying the LED. If you have an LED that requires more than 3.3V, you don’t need a resistance, but your LED will emit less light than expected.

to sum up

  • a switch A/M on the GPIO 3 (PIN 5)

  • a switch RESET on the GPIO 2 (PIN 3)

  • the anode of the LED (+ long PIN) on a PIN resistance (or directly on the 14 GPIO (PIN 8) If you don’t need a resistance)

  • the other pin resistance on GPIO 14 (PIN 8) (if you need a resistance)

  • the other Terminal of the A/M switch, the other terminal of the RESET button and the LED cathode (-, short PIN): connect these 3 terminals to ground (PIN 6)

for the connection of the button push for example, watch the video tutorial that I realized on the YouTube channel Fredi Digital Gaming where I explain the interest of the push button to the Recalbox distribution. You will see how to perform the installation, tests and as well as some information to avoid bugs.

note a few additions or changes for this video:

  • one thing to add: you need to add the line “ system.power.switch = PIN56PUSH ” in the file “ shader

  • a thing to correct: is not the file “ shader ” but “/boot/config.txt” to add disablesafemode . ”

RecalBox used to find games from old consoles. The lack of switch power off on the Raspberry Pi can partly be compensated by adding this switch.

do not hesitate to make your remarks and suggestions in the comments below.

1 comment:

Powered by Blogger.