DarkfullDante's Flight Sim Switch Box Is Powered by a Raspberry Pi Pico Running CircuitPython

Driven by a combination of hid_gamepad and hid_keyboard, the switch is designed for use with Microsoft Flight Simulator and Elite Dangerous.

Pseudonymous developer "DarkfullDante" has put together a low-cost switch board for flight simulators, powered by a Raspberry Pi Pico running CircuitPython and housed in an attractive and sturdy case.

"It's a stock aluminum case I got at my local electronic store," Dante writes. "Had to drill holes with a stepper bit. The hardest was the linear pots hole. I used a jewelers saw to cut them."

"Some of the parts were things I salvaged over time, like the rotary encoder and the linear pots came from an old busted TV amplifier. I had to buy the switches and the keyed switch but the rest is mostly salvage. I got the idea simply because my HOTAS (flight joystick) was lacking switches for a flight sim, so decided to try and have some fun."

Inside the casing, aside from a wealth of wire spaghetti, is a Raspberry Pi Pico running the CircuitPython firmware. "Most of the commands use hid_gamepad, but I was lacking input in the library for the rotary encoder," Dante notes. "The problem is that I have two 3PDP switches that act like a grid selector (three values on the X axis and three on the Y axis). For the rotary encoder to be able to work with all nine positions, that requires 18!! buttons."

"Since Circuit Python gamepad library is 32 bits, half of it is reserved for the analog sticks (four total, I used three. I only have a total of 16 buttons. So all the rotary encoder commands are obscure or unused keys like F13 to F24. CircuitPython is supposed to eventually boost the protocol to 64 bit which will give eight analog axes and 32 buttons. When it happens, I'll port everything to hid_gamepad and remove the hid_keyboard protocol."

More details on the build are available in this Reddit thread, while images of the inside can be found on Imgur.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles