Tuesday, October 22, 2024

Bringing Junked Fighter Joysticks Back to Life – The MagPi Issue 146 #CircuitPython @TheMagPi @Raspberry_Pi

 

The MagPi Magazine Issue 146 features a Pico kit to bring junked joysticks back to life.

One of the many great things about the EMF Camp events (www.emfcamp.org) is the swap shop tent where all kinds of things are brought to be sold and exchanged.

On one of my many visits there I found a slightly worn (but very heavy) pair of joysticks which looked as if they had been part of a professional simulator at some point. In this article, I’ll talk about how I reverse engineered them to create a fully fledged flight simulator controller. Along the way I happened to create a Pico program that makes it easy to use any input device as a USB joystick.

A Raspberry Pi Pico was the perfect thing to use here as it has great IO options and support for working in Python. I needed to configure it to announce itself as a game controller over USB, and then adapt my code to run on the Pico and send the appropriate messages to the PC.

Fortunately, CircuitPython has great support for making custom devices like this. First, we need to define how we want our device to appear over USB, and write some Python to make sure this is registered whenever the Pico connects over USB.

Read MoreDownload PDF pp 76-81, buy The MagPi nowsubscribe

No comments:

Post a Comment