A history of a cockpit sim build beginning in the mid 90s by Hans-Joerg Krohn:


"By now, more parcels had arrived, containing different flavors of pushbuttons, toggle switches, rotaries, displays, diodes and of course wire, lots of wire. I just had to put it all together."

I am just dabbling but certainly can relate to the above. I must say it is much easier to go about this stuff nowadays with the Internet around. For almost anything you want to know is available on youtube or a blog post somewhere.

Last night, having figured out how to get my switches on my Raspberry Pi's GPIO lines interfaced with the flight sim (and spending a good 10 minutes just sitting there toggling the parking brake on and off and grinning gleefully!), I soon realised even with 128 GPIO lines (via expanders) it's hardly enough to cover maybe one or two panels.

I spent the next part of the night googling and found two solutions:

1) Go analog. Build a resistor ladder (https://en.wikipedia.org/wiki/Resistor_ladder) around the switches. Different combinations of switches will vary the voltage on the return line, and then using an ADC chip, read the voltage into the Pi and figure out which switches were enabled.

2) Use a Priority Encoder IC (http://www.electronics-tutorials.ws/combination/comb_4.html). This is particularly useful when only one out of a set of switches can be activated at a time, such as on a rotary switch. The IC converts its set of input lines into a binary number (indicating which line is active) on its output lines. So you can reduce 8 inputs to 3, or 16 to 4, for example.

By the wee hours of the morning, I had ordered resistors and some priority encoders on eBay to play with. Now to wait for those parcels to arrive ... 8-)