I am working on a simple project using two shift registers and a single colour 8x8 LED matrix. One shift register controls all of the powers and one shift register controls all the grounds. I can use the "ShiftOut" command to control individual LED's, turn on all LED's, line by line, and row by row. However I cannot figure out how to make a simple design. The design I am working on is a heart shape, but it can be as simple as a square or even two separate lines or a couple of random LED's showing at the same time. I have included my code so far but is does not display anything as I expected.
If anyone has any advice or insight into what I might be doing wrong I would really appreciate the help.
//LEFT BOARD - POWERS
int clockPinA = 13;
int latchPinA = 12;
int dataPinA = 11;
//RIGHT BOARD - GROUNDS
int clockPinB = 10;
int latchPinB = 9;
int dataPinB = 8;
byte heartPower[8] = {B00000000, B00110110, B01001001, B01000001, B01000001, B00100010, B00010100, B00001000};
byte heartGround[8] = {B11111111, B11001001, B10110110, B10111110, B10111110, B11011101, B11101011, B11110111};
void setup()
{
pinMode(latchPinA, OUTPUT);
pinMode(clockPinA, OUTPUT);
pinMode(dataPinA, OUTPUT);
pinMode(latchPinB, OUTPUT);
pinMode(clockPinB, OUTPUT);
pinMode(dataPinB, OUTPUT);
}
void loop()
{
for (int i=0; i<8; i++)
{
digitalWrite(latchPinA,LOW);
shiftOut(dataPinA, clockPinA, LSBFIRST, heartPower[i]);
digitalWrite(latchPinA, HIGH);
digitalWrite(latchPinB,LOW);
shiftOut(dataPinB, clockPinB, LSBFIRST, heartGround[i]);
digitalWrite(latchPinB, HIGH);
}
}