Go Down

Topic: 4X4 Matrix (Read 1 time) previous topic - next topic

FallenDemon

May 14, 2012, 06:39 am Last Edit: May 14, 2012, 06:43 am by FallenDemon Reason: 1
I found a tutorial online for a 4X4 matrix. So I built it and all my LEDs are wired properly. Here is the link. http://minipenguin.com/?p=107
I think there may be an issue with the code. I think I have it wired correctly to the arduino. Anodes in rows and cathodes in columns. The diagram is staright forward. Anyways when I upload the code it works with no errors but only 4 of my LEDs are lit and it does nothing past that. In the code there is  Serial.begin(baudRate); Serial.println("Commands: on, off, auto, happy, sad, spin, wipe, bigchecker, smallchecker");
However when I open serial monitor, nothing is there. Can someone please take a look at the project and code and see if anything is wrong? This is my first built LED matrix and really want to get it going soon. Thanks.

P.S. I have the Arduino Uno R3 board.(If that makes a difference)
 

marco_c

Do you need to include a sketch?
Arduino libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

FallenDemon

What do you mean? I have the sketch. It's the one from that site I copied and pasted into arduino.

CrossRoads

Your anodes: 11,10,9,8
Your cathodes: 7,6,5,4

The sketch pins:

const int anode[4]   = { 11, 9, 7, 5 };
const int cathode[4] = { 10, 8, 6, 4 };

Have you rewritten the sketch to account for your revised pin usage?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Nick Gammon



This is the "touch the wires against the terminal and hope they connect" technique.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

FallenDemon


Your anodes: 11,10,9,8
Your cathodes: 7,6,5,4

The sketch pins:

const int anode[4]   = { 11, 9, 7, 5 };
const int cathode[4] = { 10, 8, 6, 4 };

Have you rewritten the sketch to account for your revised pin usage?



I tried plugging the anodes and cathodes according to the sketch. const int anode[4]   = { 11, 9, 7, 5 };
                                                                                                  const int cathode[4] = { 10, 8, 6, 4 };

When I did this nothing happens at all. No LEDs light up. Also the serial monitor is  supposed to print commands and it doesn't.

Nick Gammon


I think I have it wired correctly to the arduino.  


Photo please.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

FallenDemon

According to the sketch the anode pins are 11, 9, 7, 5 and the cathode pins are 10, 8, 6, 4. The photo is how I have it wired. Yellow wires are cathode and orange are anode. I just really want to get it working. Thanks for your time.

Nick Gammon

Where are the resistors? Can you show them too please?
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

FallenDemon

The resistors are on the underside of the board. Wired in between from anode (orange wires) to arduino.

Nick Gammon

Can you show the wiring side? All we see is some LEDs poking out of holes.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

FallenDemon

#11
May 15, 2012, 12:47 am Last Edit: May 15, 2012, 12:49 am by FallenDemon Reason: 1
Sure. I am fairly confident my wiring is correct because I tested each row and column and all LEDs light accordingly. The resistors are in my breadboard. Orange wires go to one side of them. Then other side of resistors go to arduino. Individually of course.

Go Up