MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
flightsimfan912
Posts: 9
Hi,

I just got an Arduino Mega 2560 R3 from Elegoo, and want to build an A320 AutoPilot panel with it. MobiFlight recognizes the Arduino and installs the MobiFlight firmware to it. However, Windows does not recognize the Mega in the USB Game Controllers page, so the Arduino is not recognized in MSFS, even with the MobiFlight Firmware.

Would love some help. Just trying to get a simple push button setup for now for trial.

Cheers!
2021-06-22 17:18
Avatar
flightsimfan912
Posts: 9
Okay so the pushbutton actually DID work. I browsed the forum a bit and did not realize that the Mega will not be recognized by Windows/MSFS, which is why Mobiflight & FSUIPC always has to be running.

Cheers!
2021-06-22 18:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
You mix up some facts....

Windows "see" your Mega garantee..... If it is working with MF then Windows MUST recognize it...... MF can not handle a board that is not registred in windows anyway!

I think you mean "Joystick" .
For sure.... A Mobiflight Board is NOT a Joystick! So it is listed in the "Device Manager" under the COM Ports!

And also for sure.... FS2020 will never detect a Mega.... Cause its again NOT a Joystick. FS2020 also not detect a USB-Harddisc or a Headset. These ( and the Arduinos) are just USB/COM Devices.... NOT HID´s.
Good Luck !
2021-06-22 23:12
Avatar
steffen
Posts: 28
Ja das Problem hatte ich auch. Im Geräte Manager von Windows wurde er Angezeigt auch der Port hat gepasst allerdings wurde es nicht mehr von Mobiflight erkannt ich habe keine Ahnung was da los ist, ich denke mal es ist gestorben.
2021-06-25 19:08
Avatar
flightsimfan912
Posts: 9
Hi again,

Meant to reply sooner pizman, thanks for your information about MobiFlight. I have been trying to learn MobiFlight software for about a week and have watched MobiFlight YouTube videos on Managed and Selected modes on the FCU, and understood enough to be able to interface a knob to control my speed setting, including managed and selected mode(the knobs I have have switches on them), and I feel pretty comfortable that I can do the rest.

One slight problem though. If I rotate the knob Mobiflight thinks I'm pressing the switch to change from Managed to Selected mode. Tried a new config and still the same thing. Followed the Youtube video pretty close, so not sure what's going on.
[Last edited by flightsimfan912, 2021-06-30 03:02]
2021-06-30 02:38
Avatar
flightsimfan912
Posts: 9
Below is my config file. Was following based off of this video: https://www.youtube.com/watch?v=wNVI2MW23j8

iconxml:
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MobiflightConnector>
  <outputs>
    <config guid="1b6a6e8d-b66c-49ab-967a-83cdb5ace989">
      <active>true</active>
      <description>SPD_MODE_OFFSET</description>
      <settings msdata:InstanceType="MobiFlight.OutputConfigItem, MFConnector, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <source type="FSUIPC" offset="0x5300" offsetType="Integer" size="1" mask="0x00FF" bcdMode="False" />
        <comparison active="False" value="" operand="" ifValue="" elseValue="" />
        <display type="" serial="-" trigger="normal" pin="" pinBrightness="255" />
        <preconditions />
        <transformation active="False" expression="$" substrStart="0" substrEnd="7" />
        <configrefs />
      </settings>
    </config>
  </outputs>
  <inputs>
    <config guid="063f3e3a-2249-4fb2-a1b5-22a62c3acc63">
      <active>true</active>
      <description>SPD_MODE_OFFSET</description>
      <settings msdata:InstanceType="MobiFlight.InputConfigItem, MFConnector, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null" serial="MobiFlight Mega/ SN-00e-c10" name="SPD_MODE" type="Button" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <button>
          <onPress type="FsuipcOffsetInputAction">
            <source type="FSUIPC" offset="0x5300" offsetType="Integer" size="1" mask="0x00FF" bcdMode="False" inputValue="if($=0,1,0)" />
          </onPress>
          <onRelease />
        </button>
        <preconditions />
        <configrefs>
          <configref active="False" ref="1b6a6e8d-b66c-49ab-967a-83cdb5ace989" placeholder="#" />
        </configrefs>
      </settings>
    </config>
    <config guid="26cffedd-4447-452f-8855-92c07ccb3931">
      <active>true</active>
      <description>SPD_MANAGED</description>
      <settings msdata:InstanceType="MobiFlight.InputConfigItem, MFConnector, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null" serial="MobiFlight Mega/ SN-00e-c10" name="SPD_MODE" type="Button" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <button>
          <onPress type="EventIdInputAction" eventId="68066" param="2" />
          <onRelease />
        </button>
        <preconditions>
          <precondition type="config" active="true" ref="1b6a6e8d-b66c-49ab-967a-83cdb5ace989" operand="=" value="1" logic="and" />
        </preconditions>
        <configrefs>
          <configref active="False" ref="1b6a6e8d-b66c-49ab-967a-83cdb5ace989" placeholder="#" />
        </configrefs>
      </settings>
    </config>
    <config guid="114a9ac5-8ccb-435c-9bb6-69a853d3ab72">
      <active>true</active>
      <description>SPD_SELECTED</description>
      <settings msdata:InstanceType="MobiFlight.InputConfigItem, MFConnector, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null" serial="MobiFlight Mega/ SN-00e-c10" name="SPD_MODE" type="Button" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <button>
          <onPress type="EventIdInputAction" eventId="68066" param="1" />
          <onRelease />
        </button>
        <preconditions>
          <precondition type="config" active="true" ref="1b6a6e8d-b66c-49ab-967a-83cdb5ace989" operand="=" value="0" logic="and" />
        </preconditions>
        <configrefs>
          <configref active="False" ref="1b6a6e8d-b66c-49ab-967a-83cdb5ace989" placeholder="#" />
        </configrefs>
      </settings>
    </config>
    <config guid="8abd3443-ade3-49af-b6b7-52bb09031ef4">
      <active>true</active>
      <description>A320_FCU_SPEED_VALUE</description>
      <settings msdata:InstanceType="MobiFlight.InputConfigItem, MFConnector, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null" serial="MobiFlight Mega/ SN-00e-c10" name="SPD_ENC" type="Encoder" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <encoder>
          <onLeft type="EventIdInputAction" eventId="65896" param="1" />
          <onLeftFast type="EventIdInputAction" eventId="65896" param="10" />
          <onRight type="EventIdInputAction" eventId="65897" param="1" />
          <onRightFast type="EventIdInputAction" eventId="65897" param="10" />
        </encoder>
        <preconditions />
        <configrefs>
          <configref active="False" ref="1b6a6e8d-b66c-49ab-967a-83cdb5ace989" placeholder="#" />
        </configrefs>
      </settings>
    </config>
  </inputs>
</MobiflightConnector>
 
2021-06-30 05:50
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi
I not build this already ( I think it was rofl-er who do this)

Basically.... I think this is outdated ( whatever it should still work)
At the moment of this "guide" Mobiflight was not already able to send DIRECT Controlls to the Sim ( Just FSUIPC was possible there)
Meanwhile we implement the "WASM Tool" in FS2020.... So Mobiflight can make IN´n- and Outputs of nearly every single system within this tool.

In easy words.... That time we build a FAKE Offset to toggle 2 switch modes.... And we build 2 Input Configs ( Managed/Selected) that work inverted whatever switch Pos is shown by our "FAKE" Offset.

Today we should be able to say " Check what Mode is active and set the other one" .... " Or directly " Please set Selected or Managed" Whatever we like.
Please check the new Input Typ for that ( Lots of Inofs on our Discord !)

*****************
Your Problem: !!!!!


If the Turning Encoder change the Mode ( that is done by button) this sounds like a device setting problem or more like a electrical Problem !!

To solve: Enable the "Logging Mode" in MF and set to "DEBUG"
Then you see in the logging window ( Below the configs) what happen.
Turn the Encoder left and right for some time.... And observe the commands that are logged.

If only Left and Rigth Encoder Data is there then it´s fine.... If you also see " Botton Press" there then your Pushbutton have a issue ( wire touch a other Pin or metal houseng for example).

In easy words.... Find out AT FIRST if Encoder/Button work itself electrical. If this is not the problem we need to check it again !
Good Luck !
2021-06-30 14:51
Avatar
flightsimfan912
Posts: 9
I just received the knobs a couple of days ago(So they're new), I really don't think they are the problem, but I guess I can try another type of knob with switch that I have and report back.

According to FSUIPC, the knob sends a message every second movement, the SPEED_SLOT_INDEX_SET and the AP_SPD_VAR_INC_SET, and at the 5th movement, it will send SPEED_SLOT_INDEX_SET twice.

I am prototyping this on the breadboard, and (I've double checked) every wire is in the place it should be, nothing is grounded when it should be, or receiving power where it shouldn't be.
[Last edited by flightsimfan912, 2021-06-30 15:28]
2021-06-30 15:22
Avatar
flightsimfan912
Posts: 9
Just tried a slightly different knob(this knob is taller) but with the same i2c module installed and I still get the same problems, so I think it's a MobiFlight, FSUIPC, or an MSFS problem.

I would attach a picture of the wiring on my breadboard, but I don't really know how to on this message board.
[Last edited by flightsimfan912, 2021-06-30 15:35]
2021-06-30 15:25
Avatar
flightsimfan912
Posts: 9
And here is a little bit of the debug messaging:

6/30/2021 7:26:17 AM(202): Executing OnLeftFast: SPD_ENC@SN-00e-c10
6/30/2021 7:26:17 AM(160): Config found for Encoder: SPD_ENC (LEFT_FAST)@SN-00e-c10
6/30/2021 7:26:17 AM(98): Executing OnPress: SPD_MODE@SN-00e-c10
6/30/2021 7:26:17 AM(60): Executing OnPress: SPD_MODE@SN-00e-c10
6/30/2021 7:26:17 AM(22): Config found for Button: SPD_MODE (PRESS)@SN-00e-c10
6/30/2021 7:26:16 AM(976): Config found for Button: SPD_MODE (RELEASE)@SN-00e-c10
6/30/2021 7:26:16 AM(922): Executing OnLeftFast: SPD_ENC@SN-00e-c10
6/30/2021 7:26:16 AM(884): Config found for Encoder: SPD_ENC (LEFT_FAST)@SN-00e-c10
6/30/2021 7:26:16 AM(822): Executing OnPress: SPD_MODE@SN-00e-c10
6/30/2021 7:26:16 AM(782): Executing OnPress: SPD_MODE@SN-00e-c10
6/30/2021 7:26:16 AM(747): Config found for Button: SPD_MODE (PRESS)@SN-00e-c10

MobiFlight is sending a button message every time I rotate this knob, and it does the same for every other knob that I have, so I will have this problem when I get ready for the Hdg, Alt, and VS managed/selected modes.
2021-06-30 15:27
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconflightsimfan912:

Just tried a slightly different knob(this knob is taller) but with the same i2c module installed and I still get the same problems, so I think it's a MobiFlight, FSUIPC, or an MSFS problem.

I would attach a picture of the wiring on my breadboard, but I don't really know how to on this message board.



??? A Button or Encoder are not I2C !!!

Please post us a picture or a link to the encoder ( name / Datasheet)
Sounds you got fully wrong hardware !
Good Luck !
2021-06-30 20:37
Avatar
flightsimfan912
Posts: 9
I think I may be sending a confusing message, so here is a picture of my setup: https://ibb.co/J3wbn1p

The knob on the left is the only one active, as it's the one I'm testing for the SPD variable at this moment. The other 3 don't work right now until I figure this out. I really don't think that the knobs are the problem, unless you can tell me which encoders are the ones I need to get, or if there is any reason why these won't work?
[Last edited by flightsimfan912, 2021-06-30 22:09]
2021-06-30 21:55
Avatar
flightsimfan912
Posts: 9
As it turns out, the 5V wire on my knob was connected to the switch cord. Facepalm. It's now working properly!
2021-06-30 22:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
B) :P

Mostly the issue is just a little small thing ! In your case a wire in the wrong pin ;-)

To awnser your last question:
These KY-040 Encoders (With PCB below it) are OK .... They are basically to difficult cause they need 5V ( and work with some resistors on the board) . We not need this for MF.
You can also use the most easy and cheap encoders you get.... Like this..... https://www.tme.eu/de/details/ec12e24104a6/inkrementale-encoder/alps/?brutto=1

In easy words....
The KY-040 are good but they are to expensive and make to much work ( additional 5v wire), and they need to much space (PCB ) . BUT They are working !!
No need to change them..... But may you think about the other ones in the future to get mor comfortable !
Good Luck !
2021-07-01 14:20
icon