MHeironimus / ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
GNU Lesser General Public License v3.0
2.07k stars 403 forks source link

Button issue #168

Open BB6560 opened 3 years ago

BB6560 commented 3 years ago

Description of Issue

I'm trying to build a controller for Microsoft Flight Simulator X. I have buttons and potentiometers. My issue is that if I press and hold a button down the simulator just gets a short pulse signal instead of a long one. For example if I bind braking to a button and hold it down, it will just brake for a moment. But the USB Game Controller panel in Windows can see that the button is still pressed down. (So it gets the whole pulse.) Maybe the problem is with my simulator, but if I plug in a PS3 controller it works properly, with the whole signal length. Have you got any idea how could I fix it?

Technical Details

Wiring Details

Arduino's internal pullup resistors used at the buttons. The button pulls the digital pin down to GND.

Code

FSXController.zip

theblackhawk76 commented 3 years ago

Try using MMJOY2, it is much easier to use with many more buttons because it can read rotary encoders differently. However, you are limited to 6 encoders and 8 axes...

PS: Don't forget the diodes!!

VkTheProgrammer17 commented 3 years ago

you could use x360ce

VkTheProgrammer17 commented 3 years ago

it would recognize the xbox controller allowing you for better detection btw, are you using breadboard? if yes then it might just be fumbling a little