This project shows how to make a control panel with various switches, displays and encoders that can be used in conjuction with Microsoft Flight simulator or other flight simulator programs such as XPlane or DCS (Combat Flight Simulator)
You can write your own software interface or save yourself the pain and simply use the excellent free and open source Mobiflight software https://www.mobiflight.com/ Included in the project is a complete mobiflight definition file for Microsoft Flight Simulator and the cudstom CJ4 aircraft.
3D print your own MCP panel for flight simulator.
Actual printed panels.
I wired all switches and encoders to pull the input pin down to ground. This means that the arduino input pins are configured to "INPUT_PULLUP" in mobiflight.
For convenience I sourced my parts from a local electronics store. Not cheap but I link it here so you can get the details of the parts and source them where you wish.
The one I used is a clone but Mobiflight recognized it without any issues.
https://www.jaycar.co.nz/duinotech-mega-2560-r3-board-for-arduino/p/XC4420
I used three 8 digit 7 segment displays. They only had red ones but ideally you want white ones. The panel is designed to accomodate these displays but these parameters can be changed in OpenSCAD. You only need three outputs for the all the displays as they are linked.
Tip: Pick the ones where the two display componets are soldered on straight. I noticed many of these displayed online are crooked. However, I did design in some leeway in the 3D panel to accomodate this.
https://www.jaycar.co.nz/8-digit-7-segment-display-module/p/XC3714
These momentary pushbuttons have build in LED's in red, green and blue. They are small and cheap and with a 3D printed custom face attached they can show whatever back-lit caption you want. The panel has slots designed for 5 of these buttons that should fit tight.
https://www.jaycar.co.nz/spst-pcb-mount-tactile-switch-with-green-led/p/SP0621
I actually used two types of encoders and the shafts were slightly different. The 5 panel holes are made to take either type. The encoders also have a push button function But the vertical wheel can not access the push button function. You need 3 inputs per LED.
https://www.jaycar.co.nz/rotary-encoder-with-pushbutton/p/SR1230
The panel has 4 dual color (Red / Green) LED's. One is used behind a back-lit round label and the other three as Landing wheel indicators. You can actually also get Amber if you turn on both Red and Green. You need two outputs per LED
https://www.jaycar.co.nz/tricolour-red-green-orange-3mm-led-4-5-6mcd-round-diffused/p/ZD0249
The panel contains two toggle switches. Each switch requiring one input.
https://www.jaycar.co.nz/spdt-sub-miniature-toggle-switch-solder-tag/p/ST0300