floxyd
Posts: 2
Joined: Sun Feb 02, 2014 3:09 pm

Using a Joystick to controll the GPIOs

Sun Feb 02, 2014 3:19 pm

Hello community,

I´ve got a Problem when using the SDL/SDL.h lib and the wiringPi lib together. I´m trying to control the GPIOs of my Raspberry Pi with a Xbox 360 Controler.
The controler alone is not the problem, I can get the button and axis Actions and can write a code to do something. For this I´m using the SDL/SDL.h lib or the /Linux/Joystick.h lib.
Otherwise I can control the GPIOs with the wiringPi.h lib without any problems too, but when I compair these two libs in one program I´m not able to get acces to the GPIOs.
The program is running and reads all actions of my controler, but it ignores everything from the wiringPi Lib. There are no compiling Errors and everything looks good.
I compile the Programm with: "g++ Programm Programm.cpp -o -lSDL -lwiringPi" or without the -lSDL in case using the Joystick.h.

I would be glad if someone could tell me how i can solve this Problem. Any other ideas are welcome too.

If you Need the Programm code, just tell me.

Thanks in advance.

Return to “C/C++”