GPIO Driver for custom gamepad PCB (driver/plugin)
-
Hi,
I want to use the GPIO as is, with buttons and resistor, so I was wondering if there was a retropie plugin for this
if not how do I write one ?
thanks
-
Do you mean you want to plug in buttons/joystick directly into GPIO pins? Install mk_arcade_joystick_rpi from the retropiesetup.sh->optional packages->drivers (I think...)
https://github.com/recalbox/mk_arcade_joystick_rpi
The above link should walk you through how to map and assign GPIO controllers.
If you give me more info, I can walk you through in more detail.
-
@mercifulhacker said in GPIO Driver for custom gamepad PCB (driver/plugin):
mk_arcade_joystick_r
but I want 4 buttons + directional cross + 2 x (L & R) buttons + start/select
ok soI guess I could wire the other controller L+R, I am making a hand held device
-
@phil123456 Directions will also do diagonal as they're axis, so if you go diagonally right up it'll detect that, plus you can tweak it for fewer buttons when setting it up (I've just skim-read the help file and can see that)
-
@phil123456 Unfortunately, mk_arcade_joystick_rpi only supports 12 buttons per controllers (up, down, left, right, a, b, x, y, L1, R1 start, select for example.)
so if you're like me and have a controller setup like a PS2 controller, you might have to go without the L2, R2 buttons....
Or find another way. I haven't had much success aside from the above drivers.
-
@mercifulhacker @phil123456 My bad, I only read "4 buttons" and not the shoulder and start/select part... Must've skim-read that too (hard day at work is my excuse).
-
it's ok, actualy the fact it's a single c file makes it easier to read
and is a good start for me if I want to tweak or soI just found ridiculous to use bluetooth while the controller and the pi are in the same box
like most people do (and writing python cos they are too lazy)you gave a great option to dig in :-)
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.