How do I enable a 6 channel ANALOG joystick?

Charles Linquist 1 Reputation point
2022-07-07T15:12:43.693+00:00

I have an application that uses the Windows joystick driver. The application can handle at least 10 channels of ANALOG input. But the Windows driver apparently was designed for 4 channels of analog input and digital (ON/OFF) switches for the rest of the channels.

I designed a joystick with a uC that provides 6 channels of analog (0-1024) input. It works properly for the first 4 channels. But channels 5 & 6 either give a very narrow range centered around mid-scale or else go to full OFF/full ON when I smoothly change the input from 0-1024.

Calibration doesn't help. I need to figure out how to modify the joystick driver (with a registry modification?) to accept at least 6 channels of analog input.

Ubuntu Linux does handle the joystick correctly. Unfortunately, my application does not run under Linux.

Windows for business | Windows Client for IT Pros | User experience | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Charles Linquist 1 Reputation point
    2022-07-14T18:04:48.747+00:00

    I wrote my application in C++. It runs on a TEENSY uC. It can accept any number of analog (ex. potentiometer) or digital (switch) outputs. Ubuntu Linux handles the "joystick" properly. My application isn't exactly a joystick, but works as one. For the purposes of this message, I'll call them "joysticks".

    The application is a R/C remote control to MAVLINK bridge. A handheld R/C remote control produces 10 channels of Analog as PPM values. The PPM signal consists of a sequence of 1000uSec - 2000uSec pulses (depending on the individual joystick positions), followed by a 5 mSec "interframe marker", and then the sequence repeats. This PPM signal stream is then output through a 2.4Ghz transmitter.

    My bridge has a receiver that accepts the 2.4GHz signals and feeds them (unmodified) to a TEENSY uC. It measures each pulse in the stream and outputs a number (0-1024 using the C++ MAP command) depending on the pulse width of the particular input channel. The uC is programmed to look like a joystick to a laptop running Windows 10 or 11. Windows recognizes it as such.

    A Windows program (Mission Planner) converts the joystick inputs back into the original pulse width values - not as a pulse width, but as actual binary numbers (1000-2000 decimal equivalent) and sends them out to a remote station using a defined protocol. Mission Planner uses the Windows joystick driver.

    Channels 1-4 work perfectly. Mission Planner has a function that shows the input values and shows those values varying smoothly as any particular joystick is moved. However, channels above 4 either gives #1 an "all or nothing" output, #2. A very narrow range centered around mid-scale, or #3. A half-scale (0-50%) output only. To make matters worse, sometimes the range changes after a Windows restart. ONE time, I got things working properly. But after rebooting Windows, the problem re-appeared.

    Calibration doesn't help, since the calibration routine obviously was designed for 4 analog channels and switches for all others. For example: at one point it mentions "press any switch". But what do you do if you have NO switches?

    As I mentioned, channels 1-4 work perfectly. But anything above channel 4 does not.

    Is there some Registry value that I could change in order to fix this? I have looked at some of the "calibration" values there, but I am reluctant to change anything until I understand what is going on.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.