Created a 3D Printed Box with a small (about 40% actual size) 737 Nose Gear Tiller, a miscellaneous slider linear potentiometer, and 2 misc. push buttons.
This box has a Arduino Micro Pro in it, which is one of those which looks like a Joystick to Windows, if the right software library is loaded. Initially, I wrote code to read the Tiller (which has a Hall-effect sensor and 2 magnets) and via the Arduino Interpolation code, converted the range of motion to 0 - 1023.
Later on, I added 2 LEDs, and using the MobiFlight system, flushed the sketch to convert the Micro Pro to a MobiFlight board. This allows the device input Tiller and Slider, the 2 push buttons, and the 2 LEDs to all work with MSFS 2020.
This is using MobiFlight 9.6.
| Arduino Pin | Function |
|---|---|
| A0 | Hall effect - Tiller |
| A2 | Linear Potentiometer - Slider |
| 2 | Push Button 1 |
| 4 | Push Button 2 |
| 5 | LED White |
| 7 | LED Red |
The trick was to get MobiFlight to properly read and interpolate the Tiller. Initially I was trying to output values in the -16384 to 16384 range, but the Event I am now using requires 0 to 1023 range. I kept getting a UInt32 error being outside the range. āUā is for unsigned so 0 and positive only.
| Event | Description | Range |
|---|---|---|
| STEERING SET | Nose Gear Steering | 0 - 1023 |
<interpolation active="True">
<value x="294" y="0" />
<value x="397" y="64" />
<value x="438" y="128" />
<value x="467" y="192" />
<value x="494" y="256" />
<value x="504" y="320" />
<value x="509" y="384" />
<value x="514" y="448" />
<value x="516" y="512" />
<value x="521" y="512" />
<value x="523" y="576" />
<value x="528" y="640" />
<value x="533" y="704" />
<value x="538" y="768" />
<value x="559" y="831" />
<value x="582" y="895" />
<value x="645" y="959" />
<value x="715" y="1023" />
</interpolation>