GPIO 6 button controller
-
Hi,
im reading this:
https://github.com/RetroPie/RetroPie-Setup/wiki/GPIO-Modules
Does anyone know if its possible to set up a controller with a dpad and six buttons on GPIO?
i have built a 3d printed gameboy and want to wire up the controller, having hacked it, the wires are too small to solder back onto the original usb controller chip, so GPIO seems my only option.Any help?
-
@spruce_m00se You might consider loading Adafruit's RetroGame. Here is a link to their sample 6-button configuration, but explore all of it, as they have other configs for Pi Zero and others. It is a slick piece of software that sets up a virtual keyboard for inputs via GPIO.
I am also a fan of mholgatem's GPIOneer software. It is similar to RetroGame, but it has a web interface. Also, mholgatem is actively developing it.
-
Retrogame works really well for me.
-
this looks like what I need,
is there a decent tutorial on how to use it? I guess I will ask Mr google -
This worked perfectly straight away,,,, absolutely great, thanks for the heads up on this one.
-
does anyone know how to turn off retrogame again? I have it on a system but I need to have a full keyboard on that system in order to connect to wifi and ssh .
-
@spruce_m00se I think retrogame drops an entry into
/etc/rc.local
so that it runs at boot. -
@caver01 or maybe in
/home/pi/.profile
-
Are these files that can be accessed from the SD card? if not then I cant get to them due to a lack of keyboard :(
-
@spruce_m00se These are not in the boot directory/partition, so not as easy editing the card on a PC/Mac. You could edit it via network (SSH) if your Pi networked. Of course, you would have to make sure SSH is enabled if it is built from a newer image.
-
no such luck, it is a pi zero, wifi isnt configured, neither is ssh.
DOH!
maybe a new image is the quickest way to fix this issue. -
@spruce_m00se Well, I would think the easy way is to simply plug in a keyboard.
-
you would think that hey, but it doesnt work. I guess only one keyboard is recognised at a time and that is the emulated one ?
-
@spruce_m00se Wait, What? That's odd. So if you boot up the P0 with a USB keyboard connected, while RetroGame is loaded the USB keyboard doesn't work? That seems very odd. It seems like you should be able to use your GPIO connected buttons to navigate out of Emulation Station to a command prompt and start typing on the USB keyboard. Otherwise, once you have it loaded, how do you ever make changes or corrections to the retrogame config?
-
@caver01
let me test that, I havent tried coming out of ES, I have only tried the usb keyboard in the retropie menus, I realised that I was having problems when I was trying to raise the volume in the mixer, I couldnt press esc to exit..... -
@spruce_m00se I have seen multiple keyboard controllers get "confused" before and one stops working. Restarting always clears it up.
-
@caver01 well this hasnt cleared up after restarting as I have restarted at elast 5 times whilst trying to sort it, I will try outside of ES and see waht happens,
-
ok, so i exited ES to the CLI, and the USB keyboard doesnt work either. The GPIO "keyboard" registers the correct presses in the CLI, but USB is as though its not conencted.
-
@spruce_m00se Bad keyboard connection? I still can't believe that loading retrogame breaks additional keyboard functionality. I don't use retrogame--I am using GPIOneer for my GPIO admin buttons which definitely does not have this problem, but I wonder if someone who does use Retrogame could chime in here and confirm if their experience is the same or different.
-
@caver01 Im going to check my usb connections onto the pi0.
they are hard soldered, they should be fine, but I put a fresh instal on a new sd card today and it didnt recognise any gamepads, although that wouldnt make much sense as I am using a usb sound card on the same non powered usb hub and it is working fine, acually its a non powered hub but being powered directly from the 5v power supply, not draining the pi.
so yeh, the keyboard works on other devices but looks like not on the pi, and the usb sound card works well on the pi. hmmmmm wifi also worked in the past,
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.