ofxPiMapper icon indicating copy to clipboard operation
ofxPiMapper copied to clipboard

example gamepad

Open magdesign opened this issue 8 years ago • 5 comments
trafficstars

What for is the example gamepad? Does this work with a PS3 usb controller instead of the mouse?

magdesign avatar Nov 06 '17 14:11 magdesign

Yes, that's the idea. It uses STL game engine.

kr15h avatar Nov 06 '17 14:11 kr15h

This means its still necessary to start ofxPiMapper with an usb device connected? I am trying to figure out if a GPIO gamepad like this http://www.keyestudio.com/shop/keyestudio-rpi-joystick-shield.html would work as a mapping controller. Since ssh control is not implemented and my keyboard simulation is far too slow....

magdesign avatar Dec 17 '17 09:12 magdesign

I successfully compiled the example_gamepad after installing SDL: sudo apt-get install libsdl2-dev sudo apt-get install libsdl2-2.0-0

Then I plugged in an usb PS2 controller and started ofxPiMapper, all I got was outputs like: SDL_JOYBUTTONDOWN controllerIndex: 0 command: COMMAND_NONE

So would I have to map the controller commands to some actions or how would this work? You mentioned something about STL game engine.

magdesign avatar Dec 17 '17 20:12 magdesign

Yes, you have to map it. I started to develop an addon for this: https://github.com/kr15h/ofxJoystack There are a few things that have to be updated, but I could push the code in the following days for you to take a look

kr15h avatar Dec 18 '17 10:12 kr15h

The sudo apt-get install's are installing the SDL game engine. It is needed in order to make the gamepads to work on the Raspberry Pi

kr15h avatar Dec 18 '17 10:12 kr15h