I got my Arduino Demuilove set just a couple weeks ago. I had gone through some of the basic projects (blinking LEDs, piezeo buzzer, dimming LEDs with a pot, etc). I eventually have a plan of hooking up a series of LED Matrices to create sort of a display, but that's far off. In the mean time, I had ordered a dual-color medium (R/Y) 8x8 matrix from SparkFun, and two MAX7219's from Tayga Electronics. I eventually got those in, and wanted to try out a bare-bones test of the chips and matrix.
My hookup image is in a followup message, since this is my first post on the boards, I can't post images.
Which essentially connects just one LED in the matrix. My intention was to get it working with one LED before I go and wire up the entire board. The one LED turns on all right, but it doesn't blink as I was expecting it to. See my code below:
#include "LedControl.h"
LedControl lc1=LedControl(9,10,11,1); //set DATA, CLOCK, and CS Pins, and indicate number of MAX7219's
int ledPin = 13; // LED connected to digital pin 13
void setup() {
for(int index=0;index<lc1.getDeviceCount();index++) {
lc1.shutdown(index,false);
}
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH); // blink two long blinks to indicate start of loop
delay(1000);
digitalWrite(ledPin, LOW);
delay(100);
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(100);
for(int i=0;i<8;i++) {
lc1.setRow(0,i,B00000000); // Go through and set all rows to be off
}
delay(1000);
digitalWrite(ledPin, HIGH); //blink three short blinks to indicate middle of loop
delay(100);
digitalWrite(ledPin, LOW);
delay(100);
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(100);
digitalWrite(ledPin, HIGH);
delay(100);
digitalWrite(ledPin, LOW);
delay(100);
for(int i=0;i<8;i++) {
lc1.setRow(0,i,B11111111); // Go through and turn on all rows.
}
delay(1000);
}
The built-in led blinks as expected, at the expected times, but the matrix LED stays on. Now, I put this together at 3am out of boredom and perverse interest, one thing I know I messed up was that I didn't have the ISET connected when I first attempted to use the MAX7219. I added in the ~30kOhm resistor after reading that part of the instructions. Clearly an oversight, but I'm not sure if it would lead to the IC not working. Any ideas? Should I go out and order more of these ICs because I noobishly fried my current ones? I'm reading up on the basics of hobbyist electronics, so I know I have a long way to go to understanding everything!
