Hi, I'm new to arduino and have only done some basic projects with LEDs. I'd like to make a small heart for Valentines day but I want to understandThe concept of multiplexing fully. I learn by doing it myself and I'd like to do many trials on breadboardBefore i try anytihing serious. How should i go aboutLearning this? Sorry for the formatting. This is from my phone.

I am looking for a tutorial too. I already found a lot of them, my problem is that they all seem to explain what is happening but I can't figure out how and why it works. Also everytime I tried to fit one of them for my needs (driving a 2x3 matrix with an ATTINY85) the LEDs either stay lit or they are flickering randomly. Any advice?

Controlling the LEDs is as simple as bringing on pin high, and another pin low, sometimes in software this is represented in 1 (high), and 0(low). When you multiplex you have rows and columns. Lets say you have a grid of 8 by 8 (64 LEDs). All your cathodes connect in row are connected, and all the anodes in a column are connected, this leaves you with 8 anodes, and 8 cathodes to deal with (instead of 64 anodes and cathodes to deal with).

When multiplexing you only light 1 led at a time, but you can turn many leds on and off very quickly, so that it appears that they are all lit at the same time, this is called persistence of vision.

So, to light a single LED, you turn one anode pin high, and one cathode pin low, this lights one LED, then you pause for a few milliseconds, then turn those pins off, You repeat this process until you light up whatever pattern you need.

This is how every cube or matrix works.

A 2x3 matrix would require 5 pins from your controller, multiplexing is only saving you 1 pin over controlling the anodes or cathodes independently, so its realistically only practical as an learning example.

Lighting single LEDs works flawless. Now I just need to find out how to put some more "action" into the whole thing.

Quote

A 2x3 matrix would require 5 pins from your controller, multiplexing is only saving you 1 pin over controlling the anodes or cathodes independently, so its realistically only practical as an learning example.

That's true, i've done it that way because an ATTINY85 has only 5 I/O pins. And yes, it is also for learning .

If you want more action, then you need to start writing code. start with making one LED light, and all others off, then turn it off, and light the next LED. Do this one by one to each LED until it sequences each LED 1 time.

There is a limit to what you can do with 6 LEDs, but you should be able to learn the basics.