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
bar_rodoy
Posts: 27
Hey. I am trying to build a project that will lit RGB leds in green when gears are down and in red when gears are up. I have several common anode RGB leds and that means that the anode is getting +5V and the color pins get the negative. In a regual arduino script there is now problam to set the pins in LOW mode and then it should work, but in MobiFlight I cant find an option for this...
Any Ideas?

P.S :
Great piece of software :)
2015-03-08 20:42
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1516
Hi Bar_Rodoy,

welcome to the MobiFlight Community!
Acutally, MobiFlight assumes that you drive your LED by Anode... but you can try out to simply invert the logic by setting it to "0" if you want your LED to shine and "1" if you want it to turn off. The only problem I see, that there is a Energy Saving Mode which is enabled after 15 minutes of inactivity (no data has been sent to the module) This would then turn on your LEDs because it set all outputs to "0".

Also remember maximum current per pin is 40 mA if you'd have two colors lit up at the same time this is already quite near to this limit if you use normal current LEDs. Just keep that in mind.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2015-03-08 21:18
Avatar
bar_rodoy
Posts: 27
Thanks! I managed to program it to light up in red when the PMDG 737's gears are up and green when its down. The only problem is thats when gear are going up and lighta become red, they turned off about a few seconds. How can I make the red light turn off after a few seconds?

And how can I turn off the energy saving mode?

Thanks in advance! This program is so great!
2015-03-08 22:31
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1516
Hi,

normally lights should turn red during transition from up to down (or vice versa)
So turn on the red light when the value is less then extended totally.

If you cannot make it work, come back to the forum

The energy saving mode cannot be turned off but should actually be no immediate problem for you.
[Last edited by DocMoebiuz, 2015-03-09 12:53]
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2015-03-08 23:08
Avatar
bar_rodoy
Posts: 27
Hey. I thing you didn't understand my point. When the gears are up the light is indeed red, but after a few seconds the lights extinguish(I am talking about what happens in the real aircraft and off course in the NGX too...). I did manage to make LED illuminate in green when the gears are down and red when its up but what I need to do is make red light extinguish after a few seconds like in the real aircraft and the NGX...
2015-03-09 08:28
Avatar
loony
From: Speyer, Germany
Posts: 157
Hi bar_rody (do you have a real name?),

I know what you mean, I had the same issue regarding the lights not turning off. I had to add third config line to solve this.
Currently I am at work, but this evening I can publish this information here.

Regards,
Stephan
Mein Homecockpit-Projekt http://www.schwarz-stephan.de
2015-03-10 12:07
Avatar
loony
From: Speyer, Germany
Posts: 157
Hi,

please import this config in your MFConnector: https://www.dropbox.com/s/22jy4g5m3530ppz/Landing%20Gear.aic?dl=0

You can see that I have several lines for the gear status:

first three rows check gear down and set the green LED on only when the value is 16383
next three rows check if the gear is moving -> if yes, red LED turns on
third rows are for readout of the gear status, and are the pre-condition for the red LEDs

I hope this is getting clearer when you see it in the MFConnector!

Have fun!

Greetings
Stephan
Mein Homecockpit-Projekt http://www.schwarz-stephan.de
2015-03-10 20:33
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1516
Hello Stephan,

thanks for providing the configuration example.

Actually I tried it out my self and wanted to prevent a second line and... I found a solution.
I changed the preset "Landing Gear XXXX (moving)" accordingly and it has been released together with the 5.3.0 version.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2015-03-11 22:51
Avatar
bar_rodoy
Posts: 27
Thanks guys. I have managed to write my own code using PMDG 737 offsets. I have a small issue which the lights gets both Red and Green for a second when the gears are going up or about to go down. Maybe an option for a delay funtion will solve that...
2015-03-12 19:34
icon