godzirra
Posts: 14
Joined: Wed Mar 13, 2013 3:23 pm

GPIO Joystick with more than one button problem

Wed Mar 13, 2013 3:26 pm

Howdy! I'm trying to create a Pi Mame cabinet and I'm using GPIO for a joystick and 6 button controller. The controller works with the joystick and 1 button currently, but I'm not entirely sure how to map the other 6 buttons to work in EmulationStation. I'm using this as a guide: http://blog.thestateofme.com/2012/08/10/raspberry-pi-g pio-joystick/ (Specifically the rpi-joystick python script)

I'm using Python uinput libraries to emulate joystick presses, and from what I've seen, I can only emulate BTN_JOYSTICK, and there doesn't seem to be a way to add a second button.

So my question! Is there a way to do this in python's uinput, or is there a better way I can emulate a joystick press when I activate a switch connected to GPIO?

Thanks!


Return to “General discussion”