-
-
Notifications
You must be signed in to change notification settings - Fork 126
Mobiflight Getting Started XPlane Parking Brake switch and led
If you just got your arduino set up with the MobiFlight firmware, and are excited to get your first interaction going with the flight simulator, this is the place to start!
-
This tutorial is about X-Plane - if you are starting with MobiFlight but have Microsoft Flight Simulator 2020, please see this tutorial instead (TODO!).
-
This tutorial covers the new, direct X-Plane support introduced in MobiFlight version 9.5, which does not require the use of xpuipc plug-in anymore. If you still use an older version for some reason, you are suggested to upgrade.
-
This tutorial expects that you have installed MobiFlight and configured and wired your switch and indicator led for the parking brake. If you need to check that part again, please do so here (TODO!).
With your switch defined, and visible in the debug log like we did in the previous tutorial, it is time to look up some X-Plane datarefs and make your switch actually operate the simulated parking brake. Open the Windows File Explorer (the file manager app) and locate your X-plane installation folder (like C:\X-Plane 12 for example). When you look into Resources\Plugins\ you should find two text files - Datarefs.txt and Commands.txt.
We will be using the Datarefs.txt in this example. Searching inside the document for "parking brake" we find this line:
sim/flightmodel/controls/parkbrake float y [0..1] Parking Brake, 1 = max
Let's note this down and open MobiFlight. The same dataref will be useful for both the parking brake switch and also for the indicator light.
We first click the "Inputs" tab on the top of the MobiFlight Connector window to select the inputs list, and add an entry for "Parking brake" and click the "Active" checkbox so it also works when we try it.
Click the button with three dots on the right side, and we can define more detailed settings in the Input Config wizard dialog. Here, we first select the "Input" tab, and pick our Arduino from the list, and select the "Parking Brake" switch we defined earlier.
On the Action Type we want to select "X-Plane - DataRef / Command", select DataRef and insert our parking brake ref there. The button input has actually two events that are shown as tabs here: OnPress and OnRelease. We want to use both, so put the same dataref on both (you can use the "copy" button to copy and paste the same config to the OnRelease page, but set Value as follows:
- OnPress: 1
- OnRelease: 0
This way the brake will release when you return the switch to the OFF position.
Set the same dataref and Value: 0 to the OnRelease page, and we are done. You can close the ConfigWizard window and press "Run" to test it.
- MobiFlight Connector Installation
- Mobiflight Connector BETA version installation
- Modules
- MobiFlight Connector Files Structure
- MobiFlight Connector Uninstall
- Modules Reset to factory default
- Verifying the WASM module installation and locating the MSFS2020 community folder
- Verifying the WASM module installation and locating the MSFS2024 community folder
- Using a Winwing FCU with MobiFlight
- Using VKB controllers with MobiFlight
- Providing logs from MobiFlight
- MobiFlight Connector How does it work
- Mobiflight Connector Main Window
- Flash module with MobiFlight firmware
- Input and Output devices
- Joysticks
- Midi Boards
- Sim Variables (for Output)
- Input Actions
- Merging configuration files
- Disabling specific COM ports
- Examples Output LEDs
- Examples Input Switch
- Example 7 segment display
- Example Servo motor
- Controlling LEDs with an output shift register
- Adding lots of buttons with an input shift register
- Beginner's guide to input multiplexers
- Key Matrix with standard MobiFlight and Multiplexers
- Tutorial Easy Driver and x.27 or x.40 Stepper Motor
- Tutorial for Airbus VS display via 7-Segment LED Module
- Example Analog Input Potentiometer
- Baron G58 Tutorial Gear, Flaps, Mags, ELT Input Output Programming
- Using Mobiflight to control arduino-based 3rd party panels (RealSimGear GNS530)
- How to use a VNH2SP30 DC motor shield with MobiFlight
- Using 3D printer mainboards
- Playing sounds by sending keystrokes to AutoHotKey
- Using the selector knob on a Honeycomb Bravo
- Using an adjustable 12 position switch as a GA starter
- Brightness of LCD displays with I2C
- Using three-position switches
- Transponder with one Rotary
- Workflow for Creating Flight Simulation Panels ‐ Part 1
- MSFS2020 RPN Tips and Tricks
- MSFS2020 Using the Custom Input Code Box
- MSFS2020 Install WASM module and Event List
- MSFS2020 How to Create and Use User Defined Lvars
- MSFS2020 How to Create a Blinking LED configuration
- MSFS2020 User Defined WASM Module Events Best Practices
- MSFS2020 Developer Mode, Model Behavior dialog and Console window
- MSFS2020 PMDG 737‐700 List of Events that require use of FSUIPC7
-
MSFS2020 PMDG 737‐700 Calibrate throttle idle and reverse thrust using interpolation (Valkyrie)
- MSFS2020 PMDG 737-700 Chrono unit functions implemented in Mobiflight
- Configuring PMDG 737 Parking Brake Lever Auto-Release with a Servo in Mobiflight
- Using encoder to drive a value back and forth within a given range
- Adding a custom board to MobiFlight
- User guide - Community Board and Custom Devices
- Developing your own custom devices/boards