-
-
Notifications
You must be signed in to change notification settings - Fork 108
Example 7 segment display
In this tutorial you'll connect a 7 segment display module to your Arduino Mega board.
The display module must be based on a Max7219 chip - only these can be controlled by the MobiFlight Connector Software.
The 7 segment displays are configured in such a way that the display the currently set COM1 frequency of your flight simulator. Therefore you use the according FSUIPC offset. The values have to be transformed a little bit - but you'll see this later explained in the tutorial.
First, the electronic connection of the 7 segment display module is explained. Then the configuration of the MobiFlight connector software is shown step by step.
The following things are needed to go through this tutorial:
- Most current version of MobiFlight Connector
- A Arduino Mega 2560 with most current MobiFlight Firmware
- A display module with MAX7219-Chip, e.g. look at eBay for "max7219 tube module" - you gonna find modules for very cheap price.
My module looks like this:
The connection of the module at the pins of your Arduino Mega board can be as follows:
You can see in the picture that the module requires:
- A power supply via a 5V pin at your Arduino (e.g. on top of pin 22)
- A connection to GND
- Three control lines
- DATA IN (DIN) - Orange, an arbitrary digital pin on your Arduino.
- CHIP SELECT (CS) - Green, an arbitrary digital pin on your Arduino
- CLOCK (CLK) - Grey, an arbitrary digital pin on your Arduino
DO NOT USE PIN D13 for any of the lines as it is known to cause issues with MAX2719s.
The labels DIN, CS and CLK will show up later in the configuration dialog of the MobiFlight Connector. The correct assignment of each of these is fundamental for getting things working as expected.
When you open MobiFlight Connector you'll see an overview of your current configuration. In this example we assume it is empty because nothing has been configured yet.
First you must open the settings dialog, because we want to configure the MobiFlight board. It must know that on some of it's pins the display module is connected.
Let's go there Extras > Einstellungen > MobiFlight Modules-Tab.
You select your module from the tree view on the left side of the tab.
There are different actions available in the toolbar below the tree view. To add a 7 segment display module you click on "New Device" > "Led 7-Segment".
A 7 segment display module has been added to your arduino module configuration.
On the right you define additional settings depending on the type of device that you add.
For a 7 segment display module there are quite some:
- DIN - Pin control line DATA IN - in the tutorial we use pin 22
- CS - Pin for control line CHIP SELECT - in the tutorial we use pin 24
- CLK - Pin for control line CLOCK - in the tutorial we use pin 26
- Num - Number of modules that are daisy chained (up to 8 modules possible)
- Globale Brightness - you can set the intensity of brightness of your led module from low to high
- Name - you can set a name here which is later used in the configuration dialogues. Use a meaningful name here and it will be easier for you later (see later in this tutorial). In the tutorial we use "COM1Display"
There is one step left - we have to upload the new configuration to your board. Therefore click on the upload-button on the very left of the toolbar.
A message will show up that indicates whether the upload has been successful or not. In the positive case, now your MobiFlight will remember that we have a 7 segment display module connected - even if you restart it or power off.
Close the Settings dialog now by clicking on OK-button. You will return to the configuration overview - which still is empty.
Now you create a new configuration for the active frequency COM1 display of your radio stack.
First, you assign a name to the new config entry by double-clicking on an empty row and typing it the name via the keyboard. In the tutorial you assign "COM1 Active".
Clock on the ...-Button at the end of the row.
The Config Wizard dialog shows up.
From the list of the available presets, choose the according one "Radio - COM1 Active Freq"
Click on "use"-Button next to the DropDown-Field.
"Automagically" all settings regarding the FSUIPC offset are filled in correctly. Alternatively you can look up the settings in the FSUIPC Offset documentation
Change to the Display-Tab by clicking on it.
Choose your module from the list in the "display type" section
Choose "Display Module" as type.
The specific display settings automatically show up below.
Choose the correct "COM1Display" from the list. All the other settings have been pre-filled by the preset. You don't have to change anything here.
Let's check if everything works so far - press the "test"-button.
Your 7 segment display module should display the numbers "123.45"
If none of your segments turn on then maybe you have mixed up the wiring. Check each control line again and verify that it is connected to the correct pins. It's easy to confuse order or pin number, believe me!
If your displays work correctly press the Stop-Button.
Close the ConfigWizard-Dialog by clicking the OK-Button.
Start your preferred flight simulator, e.g. FSX or x-plane.
Load and start your preferred flight.
Wait a moment until the connection between the MobiFlight Connector and FSUIPC has been established. This is indicated by a green symbol in the status bar of MobiFlight Connector.
Now run MobiFlight Connector by clicking the start-button from the upper toolbar.
Your 7 segment display module should now display the currently set COM1-value.
Change the value through your simulator. Watch the displays - WOW! incrediblly fast how the values stay in sync, isn't it?
With a few steps and within a couple of minutes you have built your own radio frequency display for your flight simulator. That was really easy! Try out to do the same for the standby frequency and configure a switch to toggle between active and standby.
Tell us on the forum about your progress on your project and check the other tutorials from the tutorials section.
- 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