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
lewyb3123
Posts: 7
Hello again guys.
I am trying my best to learn to programme flight sim hardware. With Mobiflight. I m pleased with myself that i managed the 7 segment displays and the encoders to set them.
I am having trouble with my KD2 switches with built in LED's. These are the various course, speed and heading selector set switches.
I have set the switch part with the PMDG 737-700 pre-sets but i cant seem to find anything for the LED option.
The KD2 switches have 1 x ground and and a signal pin for the Arduino and a +5v pin for the LED with a ground for that also.
The 5v Led pin i also was told to send to the Arduino on any pin from 1-51. I just cant work out how to make the LED come on with the KD2 switch when it is pressed.

Please help.
Thank you.(No programming jargon remember im a learner) Thanks.
2023-02-25 16:20
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi
Welcome !

Basically you must see the LED and the Switch like 2 different independent things. Whatever they are build into one element.... In theory the LED could be 2 meters away from the switch.
Also the function is not effected by each other.... So the LED not care about if Button is pressed or not.
In theory you could show with the LED e.g. the status of Parking brake but same time you controll with the button the COM1 Frequency Swap.
So See it as two different things !

About wire:
The button need one side to a Arduino Pin .... the Other side to Ground of that arduino.
The LED same need the 5V side to a arduino Pin.... The other side to GND.

You can use all Pins expect Pin 0 and 1 .... So 2-53 and A0-A15

In MF you define the devices.... As you said you still work with it.... So set the used Pin from Switch as "Button" and the used Pin from LED as "LED Output".


Abut Setup: Also here you need TWO Cofigs.
The Button is a INPUT.... So you choose for Input.... Make new Config.... Choose for the Button you create and set a Function like a FS2020 Event.

For the LED you need now a OUTPUT Config....
Same idea... You create a new line.... Choose for the LED .... And now you must set a Variable/Value we like to show.
Also in Outputs you have the same Logic... For FS2020 e.g. there are thousends of Presets. Choose for PMDG737 and you will find Variables for the needed LED Outputs.
Good Luck !
2023-02-25 22:14
Avatar
lewyb3123
Posts: 7
Thank you for your kind reply.
The instructions you have replied to me i have done. There is no option in the PMGD for any Led or an option to add it to the switch. I dont understand it. when i test the led it comes on in the button but i cant seem to find a pre set that lets me choose an LED on the MCP.
Thank you.
2023-02-26 00:23
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
check this....

https://www.youtube.com/watch?v=jaL20le721k

Adittional i high recommend to join our Discord https://discord.gg/99vHbK7
There we can talk for free and show things by share screens.
Good Luck !
2023-02-26 14:45
Avatar
lewyb3123
Posts: 7
Thank you thats very kind of you. Im not familiar with Discord. Can you please guide me to what i do and how i contact you.

Thank you.
Lewis.
2023-02-26 23:35
Avatar
lewyb3123
Posts: 7
My invite is telling me that it has expired.
Thanks
Lewis.
2023-02-26 23:44
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
In theory you can use Discord via Browser .... But way better ( For voice Calls and Shared screen) is the App.

You can Download Discord by simply google for it ( lots of sources) .... For Smartphone its in the AppStore / Google Play.

After install it, run it and click on the Link i share. Then your on our Server.
Good Luck !
2023-02-27 18:22
icon