whats the minimum number of pins to use when multiplexing 6 LEDs?

is there some kind of formula that can be applied to n LEDs?

Or in other words, how many LEDs can an Arduino Uno control without the help of a separate IC?


It depends on the style of multiplexing.

For basic Row-Column multiplexing you have N=RC - the number of LEDs is the number of rows multiplied by the number of columns. The LEDs, of course, don't have to be arranged physically in rows and columns, those are purely logical wiring concepts.

For Charlieplexing (used by the LOL shield) it's slightly more complex. The formula is: N = n² - n, where n is the number of pins, and N is the number of LEDs they can drive.

Charlieplexing can multiplex far more LEDs than traditional R/C multiplexing, but is harder to program for and wire up.

  • So concretely (to answer precisely OP), 5 pins (3+2) are needed with multiplexing (not a big gain, given extra code complexity), and 3 pins for charlieplexing. – jfpoilpret Oct 22 '17 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.