r/ArduinoHelp • u/Revolutionary-Log179 • Jul 12 '26
Having trouble with led arrays/multiplexing
As title says, I’m having trouble wrapping my head around multiplexing leans for use with a microcontroller with not enough pins to control them all. Using the drivers makes sense, mosfets too, but the code escapes me? And the use of resistors within the circuit is also confusing to me. Trying to make a small led “screen” made of diodes. Any help is appreciated
2
Upvotes
View all comments
Show parent comment
1
u/gm310509 Jul 12 '26
Here is another version that has two rows of LEDs.
There are three "animations". you can enable each one individually by uncommenting one of the function calls in the loop(). Only have one uncommented line in the loop.
https://wokwi.com/projects/469312893410392065
Pins 8 and 9 replace the +v in the first example. By using a GPIO pin and setting it high, you can control whether or not power is supplied to the LED(s) in that row.