Hello All,
I've made an LED Matrix following the schematic below, and I'm trying to have it display a checkerboard pattern using the following code.
const int rClock = 2; //chip pin 7
const int rData = 0; //chip pin 5
const int cData = 4; //chip pin 3
const int latch = 1; //chip pin 6
const int cClock = 3; //chip pin 2
byte shape[] = {B01010101, B10101010, B01010101, B10101010, B01010101, B10101010, B01010101, B10101010};
byte rowActivator[] = {B00000001, B00000010, B00000100, B00001000, B00010000, B00100000, B01000000, B10000000};
void setup() {
pinMode(rClock, OUTPUT);
pinMode(rData, OUTPUT);
pinMode(cData, OUTPUT);
pinMode(latch, OUTPUT);
pinMode(cClock, OUTPUT);
}
void loop()
{
for(int i=0; i<8; i++)
{
digitalWrite(latch, LOW);
shiftOut(cData, cClock, LSBFIRST, shape[i]);
shiftOut(rData, rClock, LSBFIRST, rowActivator[i]);
digitalWrite(latch, HIGH);
delay(2);
}
}
The problem is that while the lights that are supposed to be on are bright, all the other lights that shouldn't be on have a faint glow. Any suggestions or ways to help would be very appreciated!
