ofxPiMapper fixed for C++17 & oF 12.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Krisjanis Rijnieks 64fcf4555f Try to swap includes in example_gamepad to see if it helps msys2 compile 5 years ago
..
bin/data Add Exlene USB Game Controller to example_gamepad 7 years ago
example_gamepad.xcodeproj Update Xcode projects for Slide Show Source changes 7 years ago
src Try to swap includes in example_gamepad to see if it helps msys2 compile 5 years ago
.gitignore Rename examples 8 years ago
Makefile Rename examples 8 years ago
Project.xcconfig Rename examples 8 years ago
README.md Add basic README.md to example_gamepad 7 years ago
addons.make Move back to single addons.make file primarily for the RPi 8 years ago
addons.make.norpi Add addons.make for non-rpi platforms for CI 7 years ago
config.make Rename examples 8 years ago
openFrameworks-Info.plist Rename examples 8 years ago

README.md

Gamepad Example

This example demonstrates how to use SDL2 with ofxPiMapper in order to use gamepad for mapping. Below is what you have to do.

Install SDL2

sudo apt-get update
sudo apt-get -y install libsdl2-dev

In order to compile the example, one has to add extra compiler flags (see config.make).

PROJECT_LDFLAGS += -I/usr/include/SDL2 -lSDL2

What it does is the following: -I/usr/include/SDL2 includes SDL2, -lSDL2 links our program against it.

Note: This is tested on Raspberry Pi so far.

Define Game Controller

On each system a speciffic controller will have a different GUID. When example_gamepad is launched, it reads connected USB game controllers.

Joystick INIT success
Joystick num axes: 2
Joystick ID: 0
Joystick Name: usb gamepad
Joystick GUID: 030000001008000001e5000010010000

Use this to add another config block in controllers.xml