Skip to main content

Remote Control Joystick

It appeared that I need to connect my Spektrum DX9 to PC. Unfortunately I have no USB cable for that. And also I read that it may die when connected to PC through trainer port.

Fortunately I have Orange 6-channel RX and Arduino UNO. So I decided to create own joystick that I can use with LiftOff simulator.



Hardware

To create your own Remote Control Joystick you need:

  1. Any receiver (currently up to eight channels is supported).
  2. Arduino UNO or Arduino MEGA with 8u2, 16u2  or 32u2 USB chip.
  3. 9 wires.
Note: some cheap Arduino built with other USB-Serial bridge. Make sure your uses Atmeg as USB interface.

Preparing


First you must prepare your Arduino so it appears as USB HID device for your PC. By default Arduino appears as VCP only. To do so yo uhave to flash your 16u2 with HoodLoader. 

There are 2 ways to flash it: Standalone Arduino or from other Arduino. Select which is better for you. I used first method.

Note: There is 100nF capacitor required to flash Arduino as standalone. However on my side it worked without the capacitor. So try.

Once you flashed your Arduino USB chip you have to Install required libraries.You also need to install NicoHood HID library.

Once you done with preparing your Arduino we are ready to...

Wiring

Connect your RX to your Arduino as following.

RX out        Digital PIN
=========================
Throttle           2
Aileron            3
Elevator           4
Rudder             5
Gear (Aux0)        6
Aux1               7
Aux2               8
Aux3               9

Software


Now you are ready to upload RC Joystic code. You can download it here.

First flash code from Receiver folder. After that replug the Arduino so the 16u2 restarts. And now you can flash the code from Joystick folder. Once flash completed your Arduino appears as Game Controller in your system.

Calibrate the Joystick and that's all.

If there is something unclear or should you have any question please do not hesitate to contact me at support@tlmviewer.com or at mike@btframework.com

Comments

Popular posts from this blog

How to get OS version. Part 2.

Not so long time ago I have published short article about reading Windows OS version. I have got lot of e-mails asking me for source code. In fact, there is nothing hard to do what I described but after describing it lot of times I decided to create few units with read OS version functions.

There are three units: for Delphi, for C# and for C++.

You can download it on GitHub

I use this method in my Wireless Communication Library and it works great on all supported platforms in any possible situation (at least for now).

Should you have any question please contact me by mike@btframework.com

How to get OS version

Have you ever tried to get correct OS version number on Windows 10? If yes, you know what the pain in the ass it is.

Old days we can simple call GetVersion() or GetVersionEx() and can be sure that information returned by the function is ansolutely correct.

However, starting from Windows 8.1 Microsoft has changed the behavior of those functions. Now it returns weather on the Mars but not OS version. This is how it is described in MSDN

With the release of Windows 8.1, the behavior of the GetVersion API has changed in the value it will return for the operating system version. The value returned by the GetVersion function now depends on how the application is manifested.

Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). Once an application is manifested for a given operating system version, GetVersion will always return the version that the application is manifested for in future releases. They offer to use IsOSxxx functions.…