Years ago my brother picked up a military joystick from an army clearance sale, I mucked about with it a few years ago, reverse engineering the buttons and pots to a raspberry PI board with some custom software to show you something moving about the screen.
But I couldn’t find a way to use it as a controller on a PC where all the simulator games I want to play live.
The code is super simple, it’s heavily based off what Rudy did for his project. The main difference is that I customised the 2 switches on the top (Coax and He) to send joystick button presses on state change. As they are hard switches you had to flick them twice to do a single button press, now it’s just a single flick.
The source code is here on my Github page.
I’m really happy with how the project turned out, I’ve been playing a bit of the old version of X-Wing on steam to get ready and the Military joystick plays really well.