You're right the hardware is over my head also, that's why I'm going to use 2 MAX7219's to run my 16x16 LED matrix. Less wiring i believe...
I have got it working with an 8x8 matrix by using an example code that came with the ledcontrol.h library. I've chopped and changed it so i understand it a bit better now.
here is what i've been using to light the four corners of the 8x8 matrix as a test:
#include "LedControl.h"
LedControl lc=LedControl(12,11,10,1);
/* we always wait a bit between updates of the display */
unsigned long delaytime=1000;
void setup()
{
/*
The MAX72XX is in power-saving mode on startup,
we have to do a wakeup call
*/
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,14);
/* and clear the display */
lc.clearDisplay(0);
}
void writeBoxes()
{
byte TL[8]={B11000000,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};
byte TR[8]={B00000011,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000};
byte BR[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000011};
byte BL[8]={B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11000000,B11000000};
lc.setRow(0,0,TL[0]);
lc.setRow(0,1,TL[1]);
lc.setRow(0,2,TL[2]);
lc.setRow(0,3,TL[3]);
lc.setRow(0,4,TL[4]);
lc.setRow(0,5,TL[5]);
lc.setRow(0,6,TL[6]);
lc.setRow(0,7,TL[7]);
lc.setRow(0,8,TL[8]);
delay(delaytime);
lc.setRow(0,0,TR[0]);
lc.setRow(0,1,TR[1]);
lc.setRow(0,2,TR[2]);
lc.setRow(0,3,TR[3]);
lc.setRow(0,4,TR[4]);
lc.setRow(0,5,TR[5]);
lc.setRow(0,6,TR[6]);
lc.setRow(0,7,TR[7]);
lc.setRow(0,8,TR[8]);
delay(delaytime);
lc.setRow(0,0,BR[0]);
lc.setRow(0,1,BR[1]);
lc.setRow(0,2,BR[2]);
lc.setRow(0,3,BR[3]);
lc.setRow(0,4,BR[4]);
lc.setRow(0,5,BR[5]);
lc.setRow(0,6,BR[6]);
lc.setRow(0,7,BR[7]);
lc.setRow(0,8,BR[8]);
delay(delaytime);
lc.setRow(0,0,BL[0]);
lc.setRow(0,1,BL[1]);
lc.setRow(0,2,BL[2]);
lc.setRow(0,3,BL[3]);
lc.setRow(0,4,BL[4]);
lc.setRow(0,5,BL[5]);
lc.setRow(0,6,BL[6]);
lc.setRow(0,7,BL[7]);
lc.setRow(0,8,BL[8]);
delay(delaytime);
}
void loop()
{
writeBoxes();
}
I think im comfortable enough to put switches in to display a different pattern when pressed.
But I will need help to program for the 16x16 matrix using two MAX7219's. I dont understand the codes that i've looked at so far...
All your help is much appreciated
Thanks
Fraser