#LED Output - setting Brightness
1 messages · Page 1 of 1 (latest)
https://youtu.be/RdJUejJ-o9o
You dont need to use analog pins to turn on a led
This tutorial shows you how to install MobiFlight on your PC and Arduino Board and how to connect it with FSX using a FSUIPC Offset to turn on and off a LED
You can download the software for free at http://www.mobiflight.com/en/download.html
Get more information at http://www.mobiflight.com
Get more support at http://www.mobiflight.de/forum.html
Not turning on, but to turn it on and set a Brightness
As I understand most of the arduino pins are pwm then you can change the brightness
sorry not most of them
when you select a pin on the mobiflight module config they show if pwm or not
You need to use a PWM capable pin in your arduino to be able to set the brightness. Any other pin only gives you on/off.
Then set the PWM function in the output config Display tab. You now have a range of 0 to 255 to set brightness depending on the value of the output config ($).
So this...
and this...?
parking indicator will only return 0 or 1 as value... you should multiply that times the brightness you want to set, which could be another variable in the sim, brought in as config reference. So you do a transform of
$*#
assuming the config reference uses placeholder of #.
you now have a formula that is 0 if either variable is 0, or a value 0 to 255 if the parking brake is ON.
has a value of 0 to 255, of course
doesn't even have to be a sim variable. It can be a MF variable set with a potentiometer also.
So I can put on a Analog a one Potentiometer and then set references from this to all LEDs on the panel, if I want to have a "dimable" lights there?
you might not want annunciators to ever have a brightness value of zero.
short answer is YES. but with the caveat I just mentioned. You don't want annunciators with a brightness value of 0 because then they won't tell you when they are on.
I think most aircraft only habe dim and bright from annunciator light level
The idea is, that the panel I use on day / evening and want to set a Brightness of the LEDs depending on a surrounding.
And as I understood it is possible only on a PWM pins...?
can use the compare tab to transform 0-255 to 50-255 to prevent dim to mutch
yes, only PWM pins. That is the simple solution but requires one PWM pin per LED, which if you have a lot of LEDs, may not be a good solution.
There has been a lot of discussion here about using a FET transistor to control a backlighting circuit where all back light leds are connected. Then you only require one pwm pin to control the brightness of all leds.
If the LEDs are not just a backlight, and are dependent on states of buttons in aircraft, I need a one PWM pin for one state LED?
Yeah, I like the DM13A. Controls 16 leds individually and requires no resistors on each led.
for the simple solution, yes. One PWM pin per led. DM13A gives you control over 16 leds individually and the brightness can be set with one PWM pin.