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
737_ks
Posts: 2
Hi! I'm newbie in MF. With guides and intuition, I coped with toggle switches and indicators, but encoder stumped me.I searched in similar topics, but I didn't find a solution.

Board - Mega 2560 R3
Sim - XPlane 11
Encoder - KY-040

Wiring
GND - GND
+ - 5V
SW - pin11
DT - pin13
CLK - pin12

Im trying to use native x-plane dataref laminar/B738/autopilot/mcp_hdg_dial , test with standard values (-1,-10,1,10), but sim turns HDG SEL in right direction but with strange wrong values.
Somebode knows which way should I look ? Best regards and thanks !
2022-09-25 22:39
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5979
Supporter
Hi

At first Confirm you wire it correctly ( And set in MF the Encoder right way)

Enable Logging Mode in Settings.... RUN Mobiflight and then turn encoder slowly to left and right.
Confirm Logging show correct inputs.... So every Detent to the left show " Encoder xxx execute On Left" exactly 1 time per detent. No Brake ( e.g. every second detent) no Doubles and so on. Do the same for Right.

When we know Encoder electrical is fine and device is set perfect THEN we can think about Sim Configs.

I not work with the Dataref Tool myself ( i not own Xplane) but i´m prety sure "+1" can not work...
We not will send "+1" we like to send the Value that result if we add "1" to current Value.... So if its simular to other logics like FSUIPC or WASM then you need "$+1" instead !
Good Luck !
2022-09-26 00:06
Avatar
737_ks
Posts: 2


Wiring was right, now i used values ($+1,$+10, etc...) and it works properly!

Thanks!
2022-09-26 14:19
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5979
Supporter
In the next Hours/Days Sebastian release a new Tutorial Video on Youtube.
There he show exactly what you need....
"How to set a Encoder with the new Xplane Tool"
He also show that using Commands is better then use $+1 logic.

Please check the Youtube Channel for the Vid !
Good Luck !
2022-09-26 17:11
icon