LED matrix not working properly

So i tried to use the led matrix 1588BS and ran into some problems when i wired it using this photo as a guideline.


now the thing worked just fine when i tested it row by row, but then i tried making a smiley face. first i tried putting all leds on that i needed but that didn't really go so well since the smiley face has some weird shape or smthing, so i tried the method of flikkering every single led on with like 3ms of delay between them, and it works fine, until a bit later it'll just randomly turn off and all i get is a single led turned on.

does anyone know why and how to fix it?

const int Row[] = {2, 3, 4, 5, 6, 7, 8, 9};
const int Colmn[] = {10, 11, 12, 13, A0, A1, A2, A3};
void setup() {
  for(int i=0; i<8; i++){
    pinMode(Row[i], OUTPUT);
    pinMode(Colmn[i], OUTPUT);
  }
  for(int i=0;i<8;i++){
    digitalWrite(Colmn[i], HIGH);
  }
  Serial.begin(9600);
}
void clear(){
  for(int i = 0; i<8; i++){
    digitalWrite(Colmn[i], HIGH);
    digitalWrite(Row[i], LOW);
  }
}
const int smileyR[] = {2, 2, 4, 4, 5, 5, 5, 5};
const int smileyC[] = {2, 5, 1, 6, 2, 3, 4, 5};
static int time = 100;
static int exec = 0;
void loop() {
  if(millis()>=time){
    time+=3;
    clear();
    digitalWrite(Row[smileyR[exec]], HIGH);
    digitalWrite(Colmn[smileyC[exec]], LOW);
    exec++;
    if(exec == 8){
      exec=0;
    }
  }
}
'''
typ of plak hier code

I would suggest that you play with the following MAX7219 Based LED matrix Display unit (Fig-1) supported by Library in order to understand the complex programming philosophy of this kind of multiplexed display unit. You open the Library to access the source codes which you may help you to write codes for the presentation of smiley face on the display unit.

image
Figure-1:

Did you limit the current on the Arduino pins with resistors? See this example:

https://docs.arduino.cc/built-in-examples/display/RowColumnScanning/

Yes i did. i have 10k resistors on every single positive pin.

Did you try Post #3?
Can you light one LED? Any one LED?
Have you tried increasing the "time" delay?

yes i can, but it's fixed now. the time integer ran out of space lol

Ah. Good. What was your solution? Resetting "time"?

That's a lot.

nope just made the integer limit bigger.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.