Skip to content

RPI PI only assign up to 4 functions on each GPIO port [Project, not available yet]

OyyoDams edited this page Dec 1, 2017 · 2 revisions

If you want to build your arcade cab, you may want to add more buttons and assign them to special features. Here is how it works.

About RPI PI GPIO ports

On a RPI PI, you have several GPIO ports, from GPIO2 to GPIO26:

GPIO

When you want to connect a button, you have to wire it between a GPIOxx port and a GND. Please note that GPIO numbers are used, not PIN numbers!

How to set up on Recalbox

  1. Add this to /recalbox/share/system/recalbox.conf:
# Uncomment to enable custom GPIO script feature
system.rpi.gpio=enable
  1. Edit /recalbox/share/system/configs/retroarch/retroarchcustom.cfg and add this line: network_cmd_enable = true

  2. Configure /recalbox/share/system/configs/rpi-gpio.ini (see available commands below)

  3. Restart Recalbox and enjoy!

Syntax of rpi-gpio.ini

You must start with [GPIOxx] and replace xx by the GPIO number. Then add these 4 lines:

quick=
standard=
hold=
release=

quick is an action that will be executed if you push and release the button quickly. standard is an action that will be executed if you hold and release the button for about 1 second. hold is an action that will be executed if you hold the button for a long time (more than 2 seconds). release is an action that will be executed if you release the button after an hold event.

All actions are optional. If you don't want to assign a function, just leave blank after =

Example:

[GPIO26]
quick=VOLUP
standard=VOLDOWN
hold=VOLMUTE
release=
[GPIO16]
quick=RESET
standard=QUIT
hold=
release=

Available actions

Global actions

  • VOLUP: Volume up
  • VOLDOWN: Volume down
  • VOLMUTE: Volume mute / unmute
  • QUIT: Exit the current emulator and return to Emulation Station

Actions specific to retroarch emulators

  • RESET
  • FAST_FORWARD
  • FAST_FORWARD_HOLD
  • LOAD_STATE
  • SAVE_STATE
  • FULLSCREEN_TOGGLE
  • STATE_SLOT_PLUS
  • STATE_SLOT_MINUS
  • REWIND
  • MOVIE_RECORD_TOGGLE
  • PAUSE_TOGGLE
  • FRAMEADVANCE
  • SHADER_NEXT
  • SHADER_PREV
  • CHEAT_INDEX_PLUS
  • CHEAT_INDEX_MINUS
  • CHEAT_TOGGLE
  • SCREENSHOT
  • NETPLAY_FLIP
  • SLOWMOTION
  • OVERLAY_NEXT
  • DISK_EJECT_TOGGLE
  • DISK_NEXT
  • DISK_PREV
  • GRAB_MOUSE_TOGGLE
  • MENU_TOGGLE

English

Basic

Advanced


Français

Basique

Avancée


Deutsch

Basic

Fortgeschritten


Español

Basic

Avanzado


Português

Básico

Avançado


Italiano

Di base

Avanzate

Clone this wiki locally
You can’t perform that action at this time.