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
NachoCheese
Posts: 2
Hi, is there a way to control an output led brightness through mobiflight software or is adding/removing resistance the only way?
2022-07-16 22:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Meanwhile you can ( since 1-2 Years i think)

Mobiflight allow the use of PWM.

Step 1. You have to create your LED Output Device on a Pin that support PWM.
( there are lists in the web for every board.... And you also see it as a Note in the Device Setting Tab. If Pin allow PWM this is shown.)

Step 2. In the Output Config you enable "PWM Mode" Checkmark.

A Non PWM Pin ( Or a Config wothout enabled PWM Mode) is simply I/O
Means a output Value of "0" represent OFF .... A Value of 1 or greater represent ON ( So 0V and 5V )

A PWM Config have 255 Range..... Value 0 = OFF ..... Value 255 = Full Bright.
E.g. Value 128 represent 50% Brightness.

So Key is to use a fixed value, or e.g. a config refference where the Brightness is defined (Own Potentiometer input e.g.)

You could say $*128 .... Means Function Off is 0*128=0 ----- Function On is 1*128=128
Same logic like if($=0,0,128)
Or you say $*A ( Where A is a refference to a Config that can be e.g. a value between 0 and 255 controlled by a Poti.)

NOTE: Without rework/use a fromula your PWM System struggle.
If you use PWM Mode with a simple Value that is 1 or 0 you will see nothing....
Cause 0 = OFF and 1= 0,4% Brightness (Means also nearly OFF).
Good Luck !
2022-07-17 02:54
Avatar
NachoCheese
Posts: 2
Thank you! PWM did the trick.
2022-07-17 04:53
Avatar
Mushood
Posts: 7
In my tinkering with LED projects, I've found that software control of brightness can be more versatile than manually adjusting resistance. With the right setup, programs like Mobiflight can indeed be used to modulate LED intensity through pulse width modulation (PWM), not just turning LEDs on or off. This allows for fine-tuning brightness levels without the need for physical modifications to the circuit.

For those looking into the nitty-gritty of LED control, whether for home projects or more intricate applications, leds.to is a resource I've come across that covers a wide range of LED-related topics, including brightness control and much more.
[Last edited by Mushood, 2024-02-24 11:54]
2024-02-21 13:00
icon