6x6 LED Matrix

So i`m going to build this thing, but 6x6:

How do i connect these pins and light leds as i want: 1 here and 1 there, 2 at a time, more at a time, and so on? If i connect them like in the picture, there will be no ground...

Hi. The current will need to go to gound, of course. This will be either via the Arduino pins (when set to LOW, they will allow current to go to ground through them) or via some transistors (which will allow more current than the Arduino pins can handle by themselves, making the leds much brighter).

With no extra chips or transistors, the leds will not be very bright. So instead you can choose between 6 transistors, or a chip like ULN2003/ULN2803 or TPIC6C595, or a specialised led driver chip like MAX7219.

Its up to you to decide which way you would like to go and what you would like to learn about.

Paul

so to light up a led:

if my matrix is LED[6][6]

digitalwrite(pinCOL2, HIGH)
digitalwrite(pinROW2, LOW)

this will light up the led[2][2]?

And how do i wire the Transistors?

Ok, you have chosen transistors.

For transistors I would suggest an ordinary npn type like bc337. Place one between each row of cathodes and ground. Npn transistors should have their collector pin to the led row, emitter to ground and base to the Arduino output. Put a 4K7 resistor between the base and the Arduino output. You will also need series resistors between the Arduino outputs and the led columns The value of these resistors depends on the exact leds you are using. What is the forward voltage and max current for the leds?

Paul

i think i will use red leds at 3V

Xeyow:
i think i will use red leds at 3V

That does not sound right. Red leds normally around 2V. Blue and white leds normally around 3V.

What is max current? Can you give a link to the leds you intend to use?

Xeyow:
so to light up a led:

if my matrix is LED[6][6]

digitalwrite(pinCOL2, HIGH)
digitalwrite(pinROW2, LOW)

this will light up the led[2][2]?

You do not light up individual LEDs when driving a matrix, what you do is to scan them all, see
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html