How to configure Arcade Button connected to GPIO
-
Hi There,
Can someone please assist, I want to use Adafruit in Retropie with emulationstation and I need to configure 2 player controls e.g. 2 Joistics with 6 buttons each, 1 player and 2 Player buttons and a credit button, Connected directly to my GPIO on the Raspberry Pi
I have created Player one
s config(Below) with the RPI
s BCM numbers I am usingLEFT 22 # Player 1 Joypad left
RIGHT 10 #Player 1 Joypad right
UP 17 #Player 1 Joypad up
DOWN 27 #Player 1 Joypad down
LEFTCTRL 18 #Player 1 'A' button
LEFTALT 23 #Player 1 'B' button
Z 24 #Player 1 'X' button
X 9 #Player 1 'Y' button
SPACE 14 #Player 1 'Select' button
ENTER 15 #Player 1 'Start' button
A 25 #Player 1 Left shoulder button
S 0 #Player 1 Right shoulder buttonHow do I setup Player 2 config, I have\know BCM numbers I Want to use but I can not find the corresponding keys for Player 2
Can some please assist by filling in the Question Marks below for the Player 2 butons
???? 13 # Player 2 Joypad left
???? 19 #Player 2 Joypad right
???? 5 # Player 2 Joypad up
???? 6 # Player 2 Joypad down
???? 7 #Player 2 'A' button
???? 12 #Player 2 'B' button
???? 16 # Player 2 'X' button
???? 26 # Player 2 'Y' button
???? 8 #Player 2 'Start' button
???? 20#Player 2 Left shoulder button
???? 21 #Player 2 Right shoulder button -
@InvisiKing I forked your reply from the old topic (https://retropie.org.uk/forum/topic/5002/) you replied - don't bump old topics.
Please add some details about your setup - as explained in https://retropie.org.uk/forum/topic/3/read-this-first/ -
I am using a
Raspberry PI 3 model b v1.2
Retropie v4.7.1 with Emulationstaion included
Got the above image from "https://retropie.org.uk/download/" - raspberry 2/3 image
I have custom controls - (2 player setup) with 2 Joysticks with 6 buttons for each player, 1 player, and 2 Player start buttons, and 1 coin button connected directly to the GPIO pins as per below to the BCM GPIO numbers, not the pin numbersI went through the "https://learn.adafruit.com/retro-gaming-with-raspberry-pi/adding-controls-hardware?view=all" and various other forums and that's how I got to the Player 1 setup
-
What you're configuring is actually a keyboard - mapping GPIO pins to keys - so you can set the P2 inputs to whatever you want (as long as it's not conflicting with P1). The real configuration has to be done in the emulator and in EmulationStation you can have only one of the players configured to navigate and launch games.
I think there are a few arcade games that require P2 Coin input, so having just one coin input might pose some problem for those games.See the Keyboard controllers doc page for additional details.
There are separate drivers that can interpret the GPIO input and simulate 2 gamepads - like mk_arcade_joystick. They require either a specific wiring schema or manually configuring the mapping with driver options.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.