Friday, September 24, 2010

New project: the Cessna 172 Annunciator for X-Plane

I am a flight sim geek as well as an electronics and computer geek, which means at some point I'm bound to make my own flight simulator, so why not start now.

My ultimate goal is a replica general aviation cockpit that is easy to use for the end user as well as realistic. In the past I've created some rudimentary flight simulator controls with switches, arduinos and fake COM ports over USB. This worked pretty well but is very finicky if something gets unplugged or you don't guess the correct COM port number when running the driver program. This does not comply with my easy to use requirement. Serial communication (COM ports) is very easy to work with from a firmware and software perspective. You write bytes and read bytes. The downside is speed and setup costs though you can program around searching for the correct COM port to a certain extent, but it's a pain in the ass.

Enter USB. Fast, plug and play, configurable but slightly more complicated to set up. I've decided to go the USB route since computers don't even come with serial ports anymore. Welcome to 1996, Me.

My first foray into USB will also be my first test of the X-Plane SDK and plugin system. To keep things relatively simple, I'm going to make an annunciator. It's the lights on the panel that light up if something needs attention, like low fuel or low oil pressure. This will demonstrate gathering and sending data from the simulator to the hardware as well as sending data from the hardware back to the simulator and activating commands on the sim. The hardware to sim data will be a test button that illuminates all of the annunciator lights. Once I get this working, expanding to other more complicated functions is really just slightly modifying the framework that this project will set up.

The next few posts will probably be rapid fire, since I'm writing them all from past notes.

No comments:

Post a Comment