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! 

icon
Avatar
Dobber
Posts: 3
Good morning,

I hope you can help with an issue with rotary encoders. I have been trying. reading and messing around for a week and I can't get it a rotary encoder to work with Mobilfight and PMDG so I now need to some help if possible. I will outline some of the things I have done but still having no success.

Current setup: P3D v4.5
PMDG 777 / PMDG 747
FSUIPC Registered v6
Win 10
Mobiflight and Arduino working - tutorials for LED / Switches completed.

I am trying to start with some basic functions on the MCP so I can see how mobiflight and Arduino work and to practice before jumping in and buying lots of components that will sit in a box unused.

I have added a new encoder and selected the pins (2, 3 and 30) - all seems fine here.
I go to input - select encoder and select PMDG Event ID - EVT_MCP_HEADING_SELECTOR. I check that it's the correct Event ID from the PMDG SDK ( I have tried on both the 777 and the 747 here). I make the Mouse Parameter - Mouse wheel up (and down) - I have also tried adding the number in here 16384. I repeat for both left and right turns.

When I run I can see that the info section on Mobiflight is changing suggesting there is an input.
Save and close - remove USB cable - restart and when in P3d I get nothing.

There appears to be no action on the MCP with either left or right movement of the encoder.

I also added a switch - Heading hold - following similar patterns. The furthest I have reached is that when I turn the encoder left or right the heading hold switch keeps clicking on. I have no idea here...something is working but not sure what or not what I hoped to have happened when I programmed. EDIT: now I have the button working as expected by having mouse flag left single included

I have tried different encoders - KY040 and standard encoders but still can't get it to work.

Other things I have tried :
Adding Event ID numbers form the PMDG SDK rather than using the PMDG event ID presets
Adding mouse parameters by entering numbers not presets
Changing pins (and settings) on the Arduino
Changing encoders and types of encoders
Using FSUIPC Event ID to match the PMDG Event ID
Tried the similar on Speed / Altitude
Tried both the 777 & 747
Read the forums

I am trying but it is frustrating that what should be fairly simple - Mobiflight is making the process very simple, isn't working for me. I took inspiration from watching the videos that Karl is making in his 737DIY sim so thought I would start to learn. It's good for the mind. However, in my case its all going out of the window very soon!

Any help would be appreciated here.

Many thanks
Andy
[Last edited by Dobber, 2020-06-30 07:37]
2020-06-30 07:18
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Hi Andy.
Welcome !!

At first thank you! Normaly new users write something like " Mimimi My xxxx not work please help! " But you are different. You try to do a lot of workarounds And you try to solve the problem already yourself. thats realy rare !

After read your request.... You did nearly all but the most important thing is missing ( or i overread)
As i say always.... SPLIT between a Hardware/Software issue and a Basic Problem or a AddOn Related problem.

You say you did the PArking brake tutorials.... So you still confirm your MF-->SIM Connection is fine ! .
So your trouble is the Encoder.... Why not simple test the Encoder itself.

Instead of working with PMDG stuff..... Load a Standard Aircraft like the Mooney Bravo from P3D.... Use a Standard Event like COM1 Inc/dec.... And Test.

You must at first know..... Does the Encoder itself work and problem is only in PMDG Inputs OR is the Problem the Encoder itself !
Good Luck !
2020-07-01 00:36
Avatar
Dobber
Posts: 3
Good afternoon,

Thank you for your kind words and support given. I like to try to work things out and then if I still can't work it out then I will ask. It's about learning!

Success - my problem is solved!

It appears that Pins 2 -7 on my Arduino don't like encoders! I only have a few of them so tested them: none worked.
I then changed the pins to elsewhere (my pin 30 was working which seemed odd) and all is working. Pins 2-7 seem to work with switches and LED so who knows. As long as I do then its fine.

I opened up MB and tried Comm1 and it worked. I checked with the keypress and both Comm 1 for all my encoders.

Moving back into MB with PMDG I set the PMDG event ID and it works! ( I tried Speed, heading and Altitude - all working)
Thanks for your help, support and guidance.

Have a good day.
Andy
2020-07-01 14:28
Avatar
pluckas
Posts: 90
Supporter
iconpizman82:

....Normaly new users write something like " Mimimi My xxxx not work please help! " ....



This is my favourite Pizman moment of the week.

Thank you for making me laugh today Peter. (I hope Stephan has seen this too).

Paul
2020-07-01 16:06
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
@ Paul :love: :love: Thanks !
Hopefully nobody feels offended by my words..... But sometimes it´s realy hard to awnser the same requests over and over again ;)

@ Andy
Be so kind and confirm what Pins (2-7) you mean.
From the number i see you still know/understand Pin 0 and Pin 1 are INOP and can not be used....
BUT
Normaly Encoders should work on DIGITAL Pins 2-7

So please confirm you NOT use Analog Pins instead by a mistake. There we know about issues with Encoders. AnalogPins are NOT recommend at the moment !
Good Luck !
2020-07-01 17:12
Avatar
Dobber
Posts: 3
:) That's why I wanted to work through things from the forum first.

The pins in the 0-7 block won't accept any of my encoders (I only have 4 of them at the moment). Pins 0 and 1 are left alone and 2-7 will accept switches and LED as I have had a day of testing.
Not using the analogue pins.
I wonder if it is a power issue? I am on USB power only and did use an extension cable.
It's ok, I'm cool with it - I will just remember for when I build my first proper MCP. The pins work - just not with my encoders.

Thanks again.
2020-07-01 19:17
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3527
Supporter
Encoders not need a lot of power..... this is not a problem normaly.
BUT
If your Board increase above limits ( e.g. if you use multiple motors or a lot of LED on same Board) this can also influence the Inputs.
A other issue Spot can be the USB wire..... we got reports cheap "Giveaway" USB wires included with the chineese boards can occure in errors..... But i don´t think so here.

A last idea is ADMIN Mode.... I not know if this affect the system here.... But we have a lot of issues that was solved by using ADMIN Mode for Mobiflight and Sim! Thats basicly recommend by myself for all Situations..... Whatever programm you use. ALWAYS in Admin Mode !

@ALL

If a other user could confirm this problem ( or refute) this would save me a lot of testing time !
Is there a user who operate Encoders on Digital Pins 2-7 without problems ??
Good Luck !
2020-07-01 20:15
icon