Raspberry Pi GPIO Joystick Hack

Posted on 16.08.12 in the category Raspberry Pi

The Raspberry Pi seems to be ‘ripe’ for emulators with several ports for different platforms available. But as with any emulator the only thing missing is controlling your games with something authentic.

Raspberry Pi - Competition Pro 5000 Joystick Hack

Chris Swan has managed to hook up a retro Competition Pro 5000 joystick which most of us have probably owned in various guises during our misspent youth. He used a DB9 socket to directly connect the joystick to his Raspberry Pi’s GPIO (General Purpose Input Output) pins along with some 10k pullup resistors.

Using a pre-existing Python module called Python Uinput, he created code that converted the joysitcks GPIO input into keypresses that his MAME emulator would understand. He admits that using polling with this Python based approach isn’t the cleanest of solutions and that a Kernel module would be his ideal situation, but even so, his method works and works well.

If you want to try Chris’s approach for yourself then you can visit his blog at http://blog.thestateofme.com/2012/08/10/raspberry-pi-gpio-joystick/ where he has Pinout details and his example code for you to use.

Leave a Reply