Hi everyone, I successfully drove one color on the matrix board. The problem I am having is that two colors can appear at the same time but there is a side effect
It is a RGB 8x8 matrix. At the back, there are 32 pins.
Left side
pin 1-4 controls the first 4 columns
pin 5-12 controls the 8 green rows
pin 12-15 controls the last 4 columns
Right side
pin 16-23 controls the 8 red rows
pin 24-32 controls the 8 blue rows
I connect the Din, V5+, ground, clock and load from the arduino uno to the max7221.
I also connect Dig0 -Dig7 and SegDP to Seg G to the matrix.
At this point, I can drive the blue color by typing the code lc.setLed(BLUE,1,1,true);
For driving one more color
I only connect Dig1 and Seg A from the second max7221 to the matrix. I just try to test if I can drive two colors at the same time.
At location (1,1), I can see the red color
At location (0,0), I can see the blue color
But at location (1, 0 -8) , I can see blue color flashing
at location (1,0), I can see red color flashing
The attachment shows that green is shown at 0,0 and blue is shown at 1,7.
But at location (0,1-7) are flashing in blue and at location (1,0-6) are flashing in green
Here is my code
#include <LedControl.h>
#define BLUE 0
#define RED 1
int COLOR;
LedControl lc=LedControl(13,12,11,2);
void setup() {
// put your setup code here, to run once:
COLOR=BLUE;
lc.shutdown(COLOR,false);
lc.setIntensity(COLOR,8);
lc.clearDisplay(COLOR);
lc.setLed(COLOR,row,col,true);
COLOR =RED;
lc.shutdown(COLOR,false);
lc.setIntensity(COLOR,8);
lc.clearDisplay(COLOR);
lc.setLed(COLOR,1,1,true);
void loop() {
// put your main code here, to run repeatedly:
}
