Baron G58 Wiki. Includes custom programming and wiring for Gear, Flaps, Mags & ELT - MobiFlight/MobiFlight-Connector GitHub Wiki

                                                        **BARON G58 MSFS2020**
                                                    **Written by Joseph Montuori**
                                          **Credit Jaime Leon & Neil E. & Tuomas Kuosmanen**

1st and foremost I must give credit to Jaime, Neil and Tuomas Kuosmanen on the Mobiflight discord channel.

Without their help it would have taken me much longer to understand the programming logic integration between FS2020 and Mobiflight.

Note: The Baron G58 is part of the Deluxe Version of MSFS2020 however the concepts remain the same for multiple aircraft.

For this Wiki we will go over the more complex areas of programming the Baron G58 with hardware. Basics such as Avionics Master Toggle, Pitot Heat toggles will not be discussing because those are very simplistic.

You should also note that with each patch and update things can change and custom programming may not work. Consult the Mobi Flight discord channel and we will help.

If you would like to understand how the programming there an incredible wiki guide for mobiflight and I is highly encouraging you through each section which covers installation, the user interface, examples & tutorials and finally information pertaining to MSFS2020.

The wiki can be found here:

https://github.com/Mobiflight/MobiFlight-Connector/wiki

A Tip on full cockpit build with Mobi Flight and MSFS2020

In my case I am building a full Baron G58 Cockpit. It is a dedicated to that aircraft only. Unfortunately, some switches are not modeled in FS2020 however it may be a good idea to program in advance buttons and inputs so when more realistic model systems become available we should be able to utilize them. For example the de-icing is limited and so is the climate cabin controls however I have buttons and inputs tied together and reservice in case FS2020 models them or a 3rd party comes along.

Tips on inputs and output naming

In the Mobilflight Connector, you will see Outputs and Inputs. It is very helpful if you place the corresponding Pin number before the full description in the description row. This will help you identify issues both during bench testing and in the sim application. See the screen shot as an example:

Picture1

THE BASICS

LEDS

  • LED stands for Light Emitting Diode.
  • A Diode will only allow current to flow in one direction.
  • LED is an output.
  • The LED has anode and a cathode.
  • The cathode is the shorter leg and is the negative side of the LED.
  • The anode is the longer side and is the positive side of the LED

Based on the picture below can you identify which is the cathode and which is the anode?

Picture2

RESISTORS

  • A resistor limits current flow.
  • A resistor is measures in OHMS or is expressed as the Omega Symbol Ω.
  • You can identify a resistors value by identifying the number of colored bands. This is more than this write up
  • With your sim you will always need a resistor tied to the negative side of the LED leg (cathode).
  • I typically us a 200 OHM resistor.
  • If your LED’s are too bright then you need to try a higher value resistor that will limit current. Try a 300Ω resistor and compare it to the 200Ω

BREADBOARD

  • A breadboard is a great way to bench test inputs and outputs. Before jumping into a full-scale project, I recommend testing your components as you can interchange parts very quickly.
  • A few notes about breadboards:
    • The rows A thru J are rows and numbers 1 thru 60 are columns.
    • Between rows E and F there is separation. Imagine there are two sides of this board. A top half and bottom half
    • What you need to remember is for example row A column 1 shares a connection between B1, C1, D1, & E1.
    • Each column is separate. For example, column 2 is not shared with column 1 however the rows are shared.Row A column 2 shares a connection with B2,C2,D2 & E2.
    • There is then the positive and negative rows. The top half has two rows, and the bottom half has two rows.
    • What you must remember is that the bottom half is isolated from the top half. In other words, think of the The positive and negative rows on the top half are for rows A thru-E and the positive and negative rows for the bottom half are for rows F thru J.
    • For the positive row. Every connection in that row is shared. The same holds thru for the negative row.
  • Below is a screenshot of a breadboard
Picture3

NOTES: Your pin numbers may be different than mine. I will use mine as a guide point but you will need to sub out your own corresponding input and output pins.

THE BARON G58 GEAR PANEL

  • This panel consists of 4 LEDS. A red transit LED and 3 green LEDS for each landing gear wheel.
  • Anytime the gear handle position is changed, and the gear is moving the RED transit LED illuminates.

GEAR PANEL WIRING

  • Red led cathode (shorter side) is connected to one leg of the 200Ω resistor.
  • The other leg of the LED resistor is connected to the common negative row of the breadboard for testing. (In the field you may want to use a terminal block that is jumped out as a splice point). We then take the negative lead from the common negative row and connect it to the Arduino GRD terminal.
  • Take the positive side of the LED (Anode) and connect it to Arduino terminal D50.
  • Each green led will be wired with a resistor (the same way as the red led) and each will go to a separate terminal.
  • Connect the left landing gear wheel to terminal pin D53.
  • Connect the nose wheel landing gear wheel to terminal pin D52.
  • Connect the right landing gear wheel to terminal pin D51.
  • A locking on / off toggle switch is used for the gear panel switch. In my personal setup I have a connection between ground and pin 38 for landing gear toggle. I assume you understand how switches already work.

Your connections for LEDS should match the pictures below:

Picture4 Picture5 Picture6 Picture7

PROGRAMMING THE GEAR PANEL

Note: Programming any variables must be EXACT. There cannot be any extra spaces or characters other than what is shown below otherwise, it will not work.

Programming buttons and leds:

  • Ensure you have connected your Arduino 2560 to your PC and I trust you have already flashed the Mobiflight firmware to the Arduino.
  • Open Mobiflight connector.
  • Connect to your Arduino 2560.
  • Go to Extras then Settings.
  • Go to MobiFlight Modules.
  • Under Configured Modules highlight your Module then Right Click select Add Device then Click Button.
  • Assign to Pin 38 and give it the name Gear Toggle.
  • Under Configured Modules highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 50 and give it the name Gear Transit LED.
  • Under Configured Modules highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 53 and give it the name Gear Left LED.
  • Under Configured Modules highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 52 and give it the name Gear Nose LED.
  • Under Configured Modules highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 51 and give it the name Gear Right LED.
  • Next at the bottom left corner click on Upload Current Config to Module. This will upload the information we just entered to the Arduino Board.
  • Click OK.

Programming the Gear Down Red LED Transit:

  • Now you will be back at the main Mobiflight Connector screen.

  • Select the Outputs tabs on the top left-hand corner.

  • Double Click the Row on the empty row.

  • Type in Description Pin 50 Gear Down LED Transit.

  • Be sure the Active Checkbox is ticked.

  • Click on the three dots under the Edit column and this will bring up the Config Wizard.

  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).

  • In the Variable Row type or paste the following: (A:GEAR CENTER POSITION,Percent)

  • Under More Options. Check the box next to Transform.

  • In the Transform field type or paste the following: if($>0 && $<100, 1, 0)

  • Next click on the Display Tab.

  • Select your module under the Module Dropdown.

  • Use Type of dropdown select Pin.

  • In the Select Pins select the Gear Transit LED.

Here is screenshot of the programming:

Picture8

Programming the Gear Down Green LED Right:

  • Now you will be back at the main Mobiflight Connector screen.

  • Select the Outputs tabs on the top left-hand corner.

  • Double Click the Row on the empty row.

  • Type in Description Pin 51 Gear Down LED Right.

  • Be sure the Active Checkbox is ticked.

  • Click on the three dots under the Edit column and this will bring up the Config Wizard.

  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).

  • In the Variable Row type or paste the following: (A:GEAR RIGHT POSITION,Percent)

  • Under More Options. Check the box next to Transform.

  • In the Transform field type or paste the following: if($>99, 1, 0)

  • Next click on the Display Tab.

  • Select your module under the Module Dropdown.

  • Use Type of dropdown select Pin.

  • In the Select Pins select the Gear Right LED.

Here is a screenshot of the programming:

Picture9
  • In the Test Current Settings click on the Test button. The Gear Right LED should illuminate. If it does not then check your wiring and instructions once again.
  • Click Stop on the Test Current Settings. Then click OK.

Programming the Gear Down Green LED Nose:

  • Now you will be back at the main Mobiflight Connector screen.
  • Select the Outputs tabs on the top left-hand corner.
  • Double Click the Row on the empty row.
  • Type in Description Pin 52 Gear Down LED Nose.
  • Be sure the Active Checkbox is ticked.
  • Click on the three dots under the Edit column and this will bring up the Config Wizard.
  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).
  • In the Variable Row type or paste the following: (A:GEAR CENTER POSITION,Percent)
  • Under More Options. Check the box next to Transform.
  • In the Transform field type or paste the following: if($>99, 1, 0)
  • Next click on the Display Tab.
  • Select your module under the Module Dropdown.
  • Use Type of dropdown select Pin
  • In the Select Pins select the Gear Nose LED.

Here is screenshot of the programming and notice the difference in the Variable. Instead of (A:GEAR RIGHT POSITION,Percent) we have (A:GEAR CENTER POSITION,Percent) we replace right with Center. Can you guess what the variable will be for the Left Gear?

Picture10
  • In the Test Current Settings click on the Test button. The Gear Right LED should illuminate. If it does not then check your wiring and instructions once again.
  • Click Stop on the Test Current Settings. Then click OK.

Programming the Gear Down Green LED Left:

  • Now you will be back at the main Mobiflight Connector screen agin.
  • Select the Outputs tabs on the top left-hand corner.
  • Double Click the Row on the empty row.
  • Type in Description Pin 53 Gear Down LED Left.
  • Be sure the Active Checkbox is ticked.
  • Click on the three dots under the Edit column and this will bring up the Config Wizard.
  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).
  • In the Variable Row type or paste the following: (A:GEAR LEFT POSITION,Percent)
  • Under More Options. Check the box next to Transform.
  • In the Transform field type or paste the following: if($>99, 1, 0)
  • Next click on the Display Tab.
  • Select your module under the Module Dropdown.
  • Use Type of dropdown select Pin
  • In the Select Pins select the Gear Left LED.

Here is screenshot of the programming

Picture11
  • In the Test Current Settings click on the Test button. The Gear Right LED should illuminate. If it does not then check your wiring and instructions once again.
  • Click Stop on the Test Current Settings. Then click OK.

Landing Gear Toggle Input Programming:

  • Go back to the inputs tab.
  • Double click the add row button and Type Pin 38 Landing Gear Toggle.
  • Click on the three dots under the edit column.
  • Click on the Input tab.
  • Choose input: Select your module.
  • Device: Select Gear Toggle
  • In the input settings be sure the On Press tab is your current tab.
  • Go to Action Type and select MSFS2020 Events in the drop down.
  • Under Group select STANDARD in the drop down.
  • Next to Event select GEAR_DOWN in the drop down.
  • Now click on the “On Release” Tab.
  • Action Type: MSFS2020 Events.
  • Group: STANDARD
  • Event: GEAR_UP
  • Click on

TESTING

Summary:

  • What we did above is add a button and LED outputs and assigned them to specific pins on the Arduino board.

  • We then created an input and 4 outputs.

  • We gave specific variables to the outputs so that they will operate as they should in the aircraft as a sequence of operation.

  • Now we need to run a test.

  • Click on the Extras tab (top of the screen) and click Settings.

  • Under General and in the Test Mode Speed. I recommend setting the slider to the middle position. Then click OK.

  • Be sure the Active Check box is ticked.

  • Back at the main screen Outputs Tab. Click on Test at the top of the screen. The program will run through all the LEDs and each one should come on.

  • Click Stop.

  • Fire up MSFS2020.

  • Load up at an airport and the Baron G58.

  • Get in the air and if you have a toggle switch connected to Pin 38 then change the position and when gear starts going up observe the LEDs.

  • If you do not have a toggle switch then hit G on the keyboard or move the landing gear lever in the sim with your mouse.

THE BARON G58 FLAPS PANEL

  • This panel consists of 3 LEDS. A red transit LED and 1 blue LED for APH position and 1 yellow LED for Flaps Down.
  • Anytime the flap handle position is changed, the RED transit LED illuminates. Corresponding blue and yellow LEDs operate based on flap position.

FLAP PANEL WIRING

  • Red led cathode (shorter side) is connected to one leg of the 200Ω resistor.

  • The other leg of the LED resistor is connected to the common negative row of the breadboard for testing. (In the field you may want to use a terminal block that is jumped out as a splice point). We then take the negative lead from the common negative row and connect it to the Arduino GRD terminal.

  • Take the positive side of the LED (Anode) and connect it to Arduino terminal D34.

  • The Blue led will be wired with a resistor (the same way as the red led) and will go to a separate terminal.

  • The Yelow led will be wired with a resistor (the same way as the red led) and will go to a separate terminal.

  • Connect the Flaps Transit RED LED to terminal pin D34.

  • Connect the Flaps Blue APH LED to terminal pin D35.

  • Connect the Flaps Yellow Flaps Down LED to terminal pin D36.

  • A 3 position toggle switch is used for the flaps. 1 Terminal of the Switch is connected to Pin 14 Flaps UP. -The middle terminal of the switch is connected to ground to the common ground. -The final terminal of the Switch is connected Pin 16 Flaps DOWN.

  • We will program the 3 position toggle so that 1 position is flaps down the other is flaps up and on release, this will force the Flaps to the middle position.

FLAPS PANEL PROGRAMMING

Note: Programming any variables must be EXACT. There cannot be any extra spaces or characters other than what is shown below otherwise, it will not work.

Programming buttons and LED’s:

  • Open Mobiflight connector.
  • Connect to your Arduino 2560.
  • Go to Extras then Settings.
  • Go to MobiFlight Modules.
  • Under Configured Modules highlight your Module then Right Click select Add Device then Click Button.
  • Assign to Pin 14 and give it the name Flaps Up.
  • Highlight your Module again then Right Click select Add Device then Click Button.
  • Assign to Pin 16 and give it the name Flaps Down.
  • Highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 34 and give it the name Flaps Transit.
  • Highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 35 and give it the name Flaps APH Blue.
  • Highlight your Module again then Right Click select Add Device then Click LED / Output.
  • Assign to Pin 36 and give it the name Flaps DN Yellow.
  • Next at the bottom left corner click on Upload Current Config to Module. This will upload the information we just entered to the Arduino Board.
  • Click OK.

Programming the Flaps 3 Position input switch:

  • Go back to the inputs tab.

  • Double click the add row button and Type Pin 14 Flaps Up.

  • Click on the three dots under the edit column.

  • Click on the Input tab.

  • Choose input: Select your module.

  • Device: Select Flaps Up

  • In the input settings be sure the On Press tab is your current tab.

  • Go to Action Type and select MSFS2020 Events in the dropdown.

  • Under Group select STANDARD in the dropdown.

  • Next to Event select FLAPS_UP in the dropdown.

  • Now click on the “On Release” Tab.

  • Action Type: MSFS2020 Events.

  • Group: STANDARD

  • Event: FLAPS_1

  • Go back to the inputs tab.

  • Double click the add row button and Type Pin 16 Flaps Down.

  • Click on the three dots under the edit column.

  • Choose input: Select your module.

  • Device: Select Flaps Down

  • In the input settings be sure the On Press tab is your current tab.

  • Go to Action Type and select MSFS2020 Events in the dropdown.

  • Under Group select STANDARD in the dropdown.

  • Next to Event select FLAPS_DOWN in the dropdown.

  • Now click on the “On Release” Tab.

  • Action Type: MSFS2020 Events.

  • Group: STANDARD

  • Event: FLAPS_1

Programming the Flaps Red Transit LED:

  • Now you will be back at the main Mobiflight Connector screen.

  • Select the Outputs tabs on the top left-hand corner.

  • Double Click the Row on the empty row.

  • Type in Description Pin 34 Flaps Transit LED Red.

  • Be sure the Active Checkbox is ticked.

  • Click on the three dots under the Edit column and this will bring up the Config Wizard.

  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).

  • In the Variable Row type or paste the following: (A:TRAILING EDGE FLAPS LEFT PERCENT,Percent)

  • Under More Options. Check the box next to Transform.

  • In the Transform field type or paste the following: if(($>0 && $<33) || ($>35 && $<90), 1, 0)

  • Be sure to check the box next to transform in more option.

  • Next, click on the Display Tab.

  • Select your module under the Module Dropdown.

  • Use Type of dropdown select Pin.

  • In the Select Pins select the Flaps Transit.

  • Click on the Test button. Your RED LED flaps transit light should come on. If not, check wiring and input/output programming.

  • Stop the test.

Here is a screenshot of the programming:

Picture12 Picture13

Programming the Flaps Blue APH LED:

  • Now you will be back at the main Mobiflight Connector screen.

  • Select the Outputs tabs on the top left-hand corner.

  • Double Click the Row on the empty row.

  • Type in Description Pin 35 Flaps APH LED Blue.

  • Be sure the Active Checkbox is ticked.

  • Click on the three dots under the Edit column and this will bring up the Config Wizard.

  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).

  • In the Variable Row type or paste the following: (A:TRAILING EDGE FLAPS LEFT PERCENT,Percent)

  • Under More Options. Check the box next to Transform.

  • In the Transform field type or paste the following: if($>30 && $<35,1,0)

  • Be sure to check the box next to transform in more option.

  • Next click on the Display Tab.

  • Select your module under the Module Dropdown.

  • Use Type of dropdown select Pin.

  • In the Select Pins select Flaps APH Blur.

  • Click on the Test button. Your Blue LED flaps APH light should come on. If not, check wiring and input/output programming.

  • Stop the test.

Programming the Flaps Down Yellow LED:

  • Now you will be back at the main Mobiflight Connector screen.

  • Select the Outputs tabs on the top left-hand corner.

  • Double Click the Row on the empty row.

  • Type in Description Pin 36 Flaps Down LED Yellow.

  • Be sure the Active Checkbox is ticked.

  • Click on the three dots under the Edit column and this will bring up the Config Wizard.

  • In the SIM Variable Tab Click on the radio button SimConnect (MSFS2020).

  • In the Variable Row type or paste the following: (A:TRAILING EDGE FLAPS LEFT PERCENT,Percent)

  • Under More Options. Check the box next to Transform.

  • In the Transform field type or paste the following: if($=100,1,0)

  • Be sure to check the box next to transform in more option.

  • Next, click on the Display Tab.

  • Select your module under the Module Dropdown.

  • Use Type of dropdown select Pin.

  • In the Select Pins select Flaps APH Blur.

  • Click on the Test button. Your Yellow LED flaps down LED should come on. If not, check wiring and input/output programming.

  • Stop the test.

TESTING Summary:

  • What we did above is add a button and LED outputs and assigned them to specific pins on the Arduino board as we did with the gear.

  • We then created two inputs and 3 outputs.

  • We gave specific variables to the outputs so that they will operate as they should in the aircraft as a sequence of operation.

  • Now we need to run a test.

  • Click on the Extras tab (top of the screen) and click Settings.

  • Under General and in the Test Mode Speed. I recommend setting the slider to the middle position. Then click OK.

  • Be sure the Active Check box is ticked.

  • Back at the main screen Outputs Tab. Click on Test at the top of the screen. The program will run through all the LEDs and each one should come on.

  • Click Stop.

  • Fire up MSFS2020.

  • Load up at an airport and the Baron G58.

  • Get in the air and if you have a 3 position toggle switch connected to Pins 14 & 16 then change the position and when flaps start to move observe the LEDs.

  • If you do not have a toggle switch then move the flap position handle with your mouse.

At this point, I assume you are starting to see a pattern and you are getting more comfortable with navigating the Mobi Flight module. From here on out there will not be screenshots and the programming will be direct and straight to the point. If you have questions see us on the Discord Channel for Mobi Flight.

THE BARON G58 MAG Switches

  • In the G58 there are two mag switches as we would expect with a dual prop aircraft.
  • These can be tricky and you must pay very close attention to coordinating the input programming. Let's dive in.
  • I assume you may already know how to program the mag switch. So we will get right into the programming.

MAG SWITCH PROGRAMMING

  • Go to Extras then settings then MobiFlight Modules and go to the module, expand the tree.
  • Add device “Button” Name it Mag 1 Off and assign it to Pin 18
  • Add device “Button” Name it Mag 1 R Pos and assign it to Pin 19
  • Add device “Button” Name it Mag 1 L Pos and assign it to Pin 20
  • Add device “Button” Name it Mag 1 Both Pos and assign it to Pin 21
  • Add device “Button” Name it Mag 1 Start Pos and assign it to Pin 22
  • Add device “Button” Name it Mag 2 Off and assign it to Pin 23
  • Add device “Button” Name it Mag 2 R Pos and assign it to Pin 24
  • Add device “Button” Name it Mag 2 L Pos and assign it to Pin 25
  • Add device “Button” Name it Mag 2 Both Pos and assign it to Pin 26
  • Add device “Button” Name it Mag 2 Start Pos and assign it to Pin 27
  • Upload the configuration and click OK

MAG 1 PROGRAMMING:

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 18 Mag 1 Off
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 1 Off in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 0 (>K:MAGNETO1_SET) (A:GENERAL ENG STARTER:1, Bool) if{ 0 (>K:SET_STARTER1_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 19 Mag 1 Right Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 1 R Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 1 (>K:MAGNETO1_SET) (A:GENERAL ENG STARTER:1, Bool) if{ 0 (>K:SET_STARTER1_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 20 Mag 1 Left Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 1 L Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 2 (>K:MAGNETO1_SET) (A:GENERAL ENG STARTER:1, Bool) if{ 0 (>K:SET_STARTER1_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 21 Mag 1 Both Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 1 Both Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 3 (>K:MAGNETO1_SET) (A:GENERAL ENG STARTER:1, Bool) if{ 0 (>K:SET_STARTER1_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 22 Mag 1 Start Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 1 Start Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 3 (>K:MAGNETO1_SET) (A:GENERAL ENG STARTER:1, Bool) ! if{ 1 (>K:SET_STARTER1_HELD) }
  • Click ok.

MAG 2 PROGRAMMING:

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 23 Mag 1 Off
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 2 Off in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 0 (>K:MAGNETO2_SET) (A:GENERAL ENG STARTER:2, Bool) if{ 0 (>K:SET_STARTER2_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 24 Mag 2 Right Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 2 R Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 1 (>K:MAGNETO2_SET) (A:GENERAL ENG STARTER:2, Bool) if{ 0 (>K:SET_STARTER2_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 25 Mag 2 Left Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 2 L Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 2 (>K:MAGNETO2_SET) (A:GENERAL ENG STARTER:2, Bool) if{ 0 (>K:SET_STARTER2_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 26 Mag 2 Both Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 2 Both Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 3 (>K:MAGNETO2_SET) (A:GENERAL ENG STARTER:2, Bool) if{ 0 (>K:SET_STARTER2_HELD) }
  • Click ok.

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 27 Mag 2 Start Position
  • Go to edit. Select the input tab.
  • Select your module. For Device Select Mag 2 Start Pos in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the dropdown.
  • Copy and paste the custom code: 3 (>K:MAGNETO2_SET) (A:GENERAL ENG STARTER:2, Bool) ! if{ 1 (>K:SET_STARTER2_HELD) }
  • Click ok.

TESTING Summary:

  • What we did above is create a series of buttons and inputs. We then tied them together in the programming.
  • Fire up MSFS2020.
  • Load up at an airport and the Baron G58.
  • If you don’t have a physical switch, you can connect a wire on the ground pin of the Arduino and carefully touch it to Pins 18-22 and 23-26 one at a time. You will see the mag switches change position in the virtual cockpit.
  • You are probably thinking what about Pin 23? I personally have that reserved for a Fuel Pump switch.

THE BARON ELT ARM SWITCH

  • ELT (Emergency Locator Transmitter). This switch is functional is FS2020 and when activated will sound an alarm and flash an LED light.

THE ELT SWITCH WIRING

  • Grab yourself an Artex ELT switch with an LED or make it yourself!.
  • The toggle switch I wired one pin to ground and the other to pin 17.
  • Red led cathode (shorter side) is connected to one leg of the 200Ω resistor.
  • The other leg of the LED resistor is connected to the common negative.

PROGRAMMING THE ELT SWITCH

  • Go to Extras then settings then MobiFlight Modules and go to the module, expand the tree.
  • Add device “Button” Name it ELT On and assign it to Pin 17.
  • Add device “LED / Output” name it ELT Arm LED and assign it to pin 49.
  • Upload the information to the Arduino
  • Click OK

Back at the home screen click on the Outputs tab.

  • Create a row and name it Pin 49 ELT LED
  • Go to edit. Sim Variable tab.
  • Select the SimConnect(MSFS2020) variable type
  • Do not select a group instead go to the Variable row and past the following: (A:ELT ACTIVATED, Bool) (E:SIMULATION TIME, second) 2 * 2 % and (L:XMLVAR_ELT_STATE) 3 == or
  • Click on the Display tab and select your module, use type pin, and in display settings select your ELT Arm LED in the dropdown list under the select pins row.
  • You can choose to test it and the LED should come on.
  • Click OK

Back at the home screen click on the Inputs tab.

  • Create a row and name it Pin 17 ELT On
  • Go to edit. Select the input tab.
  • Select your module. For Device Select ELT On in the dropdown.
  • For input settings On Press:
  • Action Type: Select MSFS2020 – Custom Input in the drop down.
  • Copy and paste the custom code: 1 (>K:ELT_ON)
  • Go to the On Release tab and past the custom code: 0 (>K:ELT_OFF)
  • Click ok.

TESTING Summary:

  • What we did above is created 1 input and 1 output. We then tied them together in the programming.
  • Fire up MSFS2020.
  • Load up at an airport and the Baron G58.
  • Click on the ELT Switch and you should hear a siren and the LED should flash. Note to due to refresh rates we cannot make the LED flash quicker than what is programmed for it to be stable
  • If you have a switch as I had you wire and program above then activate the switch. If you do not you can connect a wire to the ground on your Arduino and carefully hold the wire to pin 17 and you should see the ELT come on in the virtual cockpit.

That wraps it up. I hope you enjoyed this brief tutorial and overview. Again, feel free to use the pins you want to use after understanding the concepts. Visit us on the Mobi Flight discord channel.

Happy Flying, Joseph

⚠️ **GitHub.com Fallback** ⚠️