Questions tagged [joystick]

For questions about joysticks.

496 questions
1
vote
1 answer

SDL2.dll not found -lSDL2 in QT (QJoystick)

I'm using the QJoystick library in windows and MinGW compiler. I'm working in QTCreator. I add it to the project.pro file: include (./3rdparty/QJoysticks-master/QJoysticks-master/QJoysticks.pri) And I just include #include . And if I'm…
Domkrt
  • 85
  • 8
1
vote
2 answers

How to move a sprite at a certain angle with a joystick

Hi I have finally made a working joystick in cocos2d. I am able to rotate a sprite to the exact angle that the joystick thumb, or cap, is 'pointing'. However, I am unable to move the sprite in that same direction. Is there an easy way to move the…
skiboi38
  • 11
  • 2
1
vote
0 answers

How to get vendor and productId of joystick device with javascript

Is there any way to get the vendor and productId of a joystick device with the browser? I am saving in database the joystick configuration, the problem is that in Chrome and Firefox I get diferents IDs, even though the joystick is the same. My aim…
Nendil
  • 65
  • 1
  • 5
1
vote
2 answers

Debouncing joystick button input

I have a joystick class written in python with gobject, it works great except for one minor problem. Button bounce when I run the code below, it picks up all the button presses multiple times. How can I reduce that to one message per button press…
giodamelio
  • 5,465
  • 14
  • 44
  • 72
1
vote
1 answer

Joystick Coordinates

Hi all I need your help using open TK works on dot net framework 4.5 using Xaml I figured that out. using the following code. I want to replicate it on a windows form but open TK doesn't like forms. I did a lot of googling and found 2 options SlimDX…
user2180706
  • 307
  • 3
  • 8
1
vote
0 answers

Gyroscope doesnt work when i put a wait_for_event function on Sense HAT

For a project i need to use the gyroscope and the joystick on a sense hat The gyroscope part work just fine but when i add juste the line : event = s.stick.wait_for_event() (s = SenseHat()) the gyroscope stop working which is very strange since the…
LeBelge
  • 13
  • 3
1
vote
1 answer

Python function works fine except when imported

I've tried to distill this to the essentials. This code works fine. from evdev import InputDevice, ecodes dev = InputDevice('/dev/input/event2') # this is the joystick event file button = {304: 'A', 305: 'B', 307: 'X', 308: 'Y' } # Xbox360…
user52326
  • 11
  • 2
1
vote
2 answers

c++ programming for joystick in windows

i want to connect joystick to my c++ qt program in windows.I studied about programming with win32 api using the joystickapi library in microsoft guid for joystick program But I didn't understand exactly What should I do after checking the system…
masoume
  • 33
  • 1
  • 6
1
vote
0 answers

Pygame joystick doesn't show multiple joysticks

I am using a Thrustmaster's F/A-18C Hornet with HOTAS Magnetic Base, and an APEM USB Thumbstick, both of them are connected to Raspberry Pi 3, the issue I am having is that the pygame only recognize 1 of them at a time, any idea how can I solve this…
bu3skoor77
  • 11
  • 1
1
vote
2 answers

arduino joystick library, don't stop joystick

I'm making a gamepad on a joystick using an arduino pro micro. Input commands such as up and down from the console, raspberry pi's gpio will output them and the arduino will receive them and input them to the game machine. I use the…
Kouji Kawasaki
  • 153
  • 3
  • 11
1
vote
1 answer

How to publish a JoyFeedbackArray Message

I'm trying to publish to the topic /joy/set_feedback. I had this in my include: #include I had my Nodehandle and Publisher like this : feed_pub = nh->advertise("/joy/set_feedback",…
Slachcrash
  • 27
  • 1
  • 6
1
vote
1 answer

With SDL2, how do I reliably get the initial positions of the joystick axes?

I'm using the SDL2 event-based joystick API to obtain the positions of the analog joystick axes, and this is mostly working well. However, SDL2 fails to reliably deliver those positions when the software is starting up. Even when forcing the…
JPNotADragon
  • 2,050
  • 2
  • 25
  • 31
1
vote
0 answers

How to use FF_CONSTANT for Force feedback for Linux?

I am not able to utilize FF_CONSTANT force effect. My try code is: struct ff_effect joy_effect_, joy_effect_2; if (iwantconstantforce) { joy_effect_.id = -1; joy_effect_.type = FF_CONSTANT; joy_effect_.direction = 0x0000; //…
Jai
  • 377
  • 2
  • 14
1
vote
1 answer

Is this the right way to access array elements?

I have an array filled with ones and zeros, also i have two LED (1 = Left LED / 0 = Right LED ) int Game[100] And I have an array where I write user actions ( Using joystick ). (( The initial thought with this array was to constantly increase its…
Vlad Paskevits
  • 388
  • 2
  • 12
1
vote
0 answers

Extra Semi Circle Line For Joystick

I have a joystick which takes to image views for thumb and joystick base as parameters. I need to add extra path between buttons and joystick to left as it is seen in the picture below. I could not get it done because of the circle itself is image…
Habil Ganbarli
  • 213
  • 2
  • 7
  • 14