loading

In an arduino controlled led matrix, can you control the brightness of leds?

I'm looking at making a matrix leds that pulse and glitter randomly but can also scroll message or display shapes when needed. 

Can you control the brightness of individual leds during a matrix scan?



maewert6 years ago

I can think of a couple of ways to change the brightness of an LED during a scan. 
If you only wanted maybe three levels: Full on, Mid, and Off, then you may be able to scan at twice the normal frequency.  For Full brightness you'd turn the LED on for both scan cycles. For half brightness only for one cycle, and for off, none of the scan cycles.

Another method might be to use the normal scan rate but use multiple output pins for each LED.  Each pin would have a different value of resistor going ot the LED such that it makes a simple D/A converter.  Using two lins for each LED could give you OFF 1/4 1/2 Full brightness levels.

Best Wishes.

Theoretically you can, but it will take some pretty clever coding to do it fast enough.

Steve