I have finished a preliminary version of a 'Universal Controller Emulator', written in Python. This should help those who want to play with Stubby, but cannot find a PS2 controller to re-purpose.
The program is very simple (currently about 150 lines), and is written in Python (I tested it on python 2.7 in Debian Jessie). It requires the pyserial and pygame libraries (both of which are available across all major platforms).
The controls are simple: use the keyboard to emulate the Universal Controller.
- Hit 'T' to press the Start button on the UC.
- Hit 'Right Control' and 'Left Control' to press the R2 and L2 buttons on the UC
- Use WASD keys to emulate the left joystick
- Use the arrow keys to emulate the right joystick
Note that in order to get key press / release events working in a cross platform manner, I need to use pygame (and I need to open a SDL window, which in turn requires focus). It is just an empty, black window at 320x200 pixels in size. I'm not a fan of it, but it works.
You can download this program from the GitHub repository, under the 'python' folder.
Cheers
Discussions
Become a member
In order to follow projects & hackers or give likes
Already a member?you need to create an account.