GPIO buttons config HOWTO?
GPIO buttons config HOWTO?
Hello
Have a ZERO wired directly from the GPIO to a common ground panel.
Can not get it to work.
Hope someone here has any good tips.
Have updated with a fresh install of retropie 4.02.
Have followed this guide on how to do the software configuration.
https://learn.adafruit.com/retro-gaming ... s-software.
There is not much info on the internet on how to do this, and the guide above is the only updated to the new easy way to do it.
Have checked my wiring for contiuinity and have even tried another raspberry pi with an jumper cable between pins for simulating common ground panel.
Have read the tutorial up and down without result.
I am not sure if the key names are correct, and that may be the issue.
And i am not sure if i should use the "GPIO" number or the "PIN" number in the retrogame.cfg file
I also get "no gamepad detected" at retropie welcome setup screen.
retrogame.cfg file is placed in /boot folder and looks like this:
# Sample configuration file for retrogame.
# Really minimal syntax, typically two elements per line w/space delimiter:
# 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).
# 2) a GPIO pin number; when grounded, will simulate corresponding keypress.
# Uses Broadcom pin numbers for GPIO.
# If first element is GND, the corresponding pin (or pins, multiple can be
# given) is a LOW-level output; an extra ground pin for connecting buttons.
# A '#' character indicates a comment to end-of-line.
# File can be edited "live," no need to restart retrogame!
# Here's a pin configuration for the PiGRRL 2 project:
GND 39 # 'GND'
LEFT 31 # Joypad left
RIGHT 32 # Joypad right
UP 29 # Joypad up
DOWN 35 # Joypad down
LEFTCTRL 37 # 'A' button
LEFTALT 36 # 'B' button
SPACE 40 # 'Select' button
ENTER 38 # 'Start' button
# For configurations with few buttons (e.g. Cupcade), a key can be followed
# by multiple pin numbers. When those pins are all held for a few seconds,
# this will generate the corresponding keypress (e.g. ESC to exit ROM).
# Only ONE such combo is supported within the file though; later entries
# will override earlier.
Have a ZERO wired directly from the GPIO to a common ground panel.
Can not get it to work.
Hope someone here has any good tips.
Have updated with a fresh install of retropie 4.02.
Have followed this guide on how to do the software configuration.
https://learn.adafruit.com/retro-gaming ... s-software.
There is not much info on the internet on how to do this, and the guide above is the only updated to the new easy way to do it.
Have checked my wiring for contiuinity and have even tried another raspberry pi with an jumper cable between pins for simulating common ground panel.
Have read the tutorial up and down without result.
I am not sure if the key names are correct, and that may be the issue.
And i am not sure if i should use the "GPIO" number or the "PIN" number in the retrogame.cfg file
I also get "no gamepad detected" at retropie welcome setup screen.
retrogame.cfg file is placed in /boot folder and looks like this:
# Sample configuration file for retrogame.
# Really minimal syntax, typically two elements per line w/space delimiter:
# 1) a key name (from keyTable.h; shortened from /usr/include/linux/input.h).
# 2) a GPIO pin number; when grounded, will simulate corresponding keypress.
# Uses Broadcom pin numbers for GPIO.
# If first element is GND, the corresponding pin (or pins, multiple can be
# given) is a LOW-level output; an extra ground pin for connecting buttons.
# A '#' character indicates a comment to end-of-line.
# File can be edited "live," no need to restart retrogame!
# Here's a pin configuration for the PiGRRL 2 project:
GND 39 # 'GND'
LEFT 31 # Joypad left
RIGHT 32 # Joypad right
UP 29 # Joypad up
DOWN 35 # Joypad down
LEFTCTRL 37 # 'A' button
LEFTALT 36 # 'B' button
SPACE 40 # 'Select' button
ENTER 38 # 'Start' button
# For configurations with few buttons (e.g. Cupcade), a key can be followed
# by multiple pin numbers. When those pins are all held for a few seconds,
# this will generate the corresponding keypress (e.g. ESC to exit ROM).
# Only ONE such combo is supported within the file though; later entries
# will override earlier.
Re: GPIO buttons config HOWTO?
Should i use the pin nr or the GPIO number in the retrogame.cfg?
My Ground point is PIN 39 it has no GPIO number, how should it be texted in retrogame.cfg?
My "A" button is wired to PIN 37 same as GPIO26, should i use 37 or 26 in the retrogame.CFG?
Tutorial says this about ground point, but i dont understand it.
"If you want to use a GPIO pin as a spare ground for buttons: use “GND” as the key name, then list one or more pin numbers separated by spaces."
My Ground point is PIN 39 it has no GPIO number, how should it be texted in retrogame.cfg?
My "A" button is wired to PIN 37 same as GPIO26, should i use 37 or 26 in the retrogame.CFG?
Tutorial says this about ground point, but i dont understand it.
"If you want to use a GPIO pin as a spare ground for buttons: use “GND” as the key name, then list one or more pin numbers separated by spaces."
- Chedda
- Posts: 151
- Joined: Fri Sep 16, 2016 3:11 pm
- Location: USA (for now)
- Has thanked: 29 times
- Been thanked: 52 times
Re: GPIO buttons config HOWTO?
Your config should be this.
LEFT 6 # Joypad left
RIGHT 12 # Joypad right
UP 5 # Joypad up
DOWN 19 # Joypad down
LEFTCTRL 26 # 'A' button
LEFTALT 16 # 'B' button
SPACE 21 # 'Select' button
ENTER 20 # 'Start' button
LEFT 6 # Joypad left
RIGHT 12 # Joypad right
UP 5 # Joypad up
DOWN 19 # Joypad down
LEFTCTRL 26 # 'A' button
LEFTALT 16 # 'B' button
SPACE 21 # 'Select' button
ENTER 20 # 'Start' button
Builder and tinkerer
Re: GPIO buttons config HOWTO?
Thanks.
tried it now still not working.
Could there be some command missing in the tutorial, or some misspelling?
this line
/home/pi/Adafruit-Retrogame/retrogame &
is copied in to this folder
sudo nano /etc/rc.local
tried it now still not working.
Could there be some command missing in the tutorial, or some misspelling?
this line
/home/pi/Adafruit-Retrogame/retrogame &
is copied in to this folder
sudo nano /etc/rc.local
Re: GPIO buttons config HOWTO?
Tutorial says nothing about make retrogame, how is the command?
and when do i use it?
As i understand from this tutorial there is a new simpler way of doing this as of september 2016.
and when do i use it?
As i understand from this tutorial there is a new simpler way of doing this as of september 2016.
Re: GPIO buttons config HOWTO?
Hi,
i used this tuto and work perfectly, not trouble at all for ALL GAME
Iv'ed test a lot of game and emulator and all work #1.
http://www.sudomod.com/forum/viewtopic.php?p=525
i used this tuto and work perfectly, not trouble at all for ALL GAME
Iv'ed test a lot of game and emulator and all work #1.
http://www.sudomod.com/forum/viewtopic.php?p=525
Who is online
Users browsing this forum: No registered users and 1 guest