how to make still led matrix

good day im building an led matrix based on this link..

and i got it working

my problem is how to make it still ,

here is the code i used

const int numPatterns = 17;//this is the number of patterns you want to display
byte patterns[numPatterns][10]={space,M,A,D,E,space,B,Y,space,V,A,D,I,M,space};// the patterns order
void setup(){
  pinMode(DataPin,OUTPUT);
  pinMode(ClockPin,OUTPUT);
  pinMode(LatchPin,OUTPUT);
  //simple stuff here
 pinMode(clock,OUTPUT);
  pinMode(Reset,OUTPUT);
  //reseting the 4017 IC, you have to do this
 digitalWrite(Reset,HIGH);
  delayMicroseconds(5);
  digitalWrite(Reset,LOW);
}

void display_pattern(int loops)//int loop acts like a delay, it take 8 mSecands to scan all of the rows so int loops = 15 is a good time for it
{ 
  for(x=0;x<numPatterns-1;x++){ // loop over the patterns
   for (int z=0;z<8;z++){ //scrolls one bite at a time 
    for(int t=0;t<loops;t++){// the delay we get with loops
     for(y=0;y<10;y++){// loops over the array of bytes
     byte temp = patterns[x][y]; 
     byte temp_2=patterns[x+1][y];
      digitalWrite(LatchPin, 0);
     shiftOut(DataPin, ClockPin,MSBFIRST,((temp<<z)+(temp_2>>7-z)));//writes digital outputs, Z is for how much bites it need to scroll
          digitalWrite(LatchPin, 1);
      delayMicroseconds(800);
      digitalWrite(LatchPin, 0);
     shiftOut(DataPin, ClockPin,MSBFIRST,0);
      digitalWrite(LatchPin, 1);
     digitalWrite(clock,HIGH);
     digitalWrite(clock,LOW);
   }
  }
 }
}
}

void loop(){
 display_pattern(15);// calls for the display_pattern function and says that int loop = 15(if you do more loop the pattern whould scrrol slower).
}

the letters move from right to left. i have weak coding skill please help me

thanks

my problem is how to make it still ,

What exactly do you want to display ? Should each character be displayed in turn and then be replaced by the next one ?

Incidentally, the technique of using for loops to implement a delay is a bad idea. There are better ways.

You could do something like adding a variable such as "int endOfText = 0;" which would be changed to 1 after the last letter is in place. Then in your loop check if its 0 before starting the display_pattern(15) again.

void loop(){
   if(endOfText == 0){
       display_pattern(15);
   }
}

And as UKHeliBob mentions, "for", "while" and "delay" all block the rest of your sketch from running until they are done. Have a look at Blink without delay for a better method (in most cases)

UKHeliBob:
What exactly do you want to display ? Should each character be displayed in turn and then be replaced by the next one ?

Incidentally, the technique of using for loops to implement a delay is a bad idea. There are better ways.

Yes i would like to make a character stay until i press a button to change to the next one :slight_smile: