LED MATRIX 8X8 STATIC LETTERS (I'm a beginner)

Hi guys!
I'm a newbie. I'm trying to display static letters on my 8x8 led matrix. I just tried to follow this idea:

I managed to display scrolling letters but now I want to stop them. How can I change the code suggested by that tutorial?

or is there a better method to do the same thing?

Thaaaanks :slight_smile:

I managed to display scrolling letters but now I want to stop them.

Put up a stop sign. Or your code.

I'm not sure to have understood exactly what you mean :D.

Post your code.

Ok.This is my solution but I'm sure this is not the smartest one. it draws a "+" exploiting persistence of vision.

const int latchPin = 8;//Pin connected to ST_CP of 74HC595
const int clockPin = 12;//Pin connected to SH_CP of 74HC595
const int dataPin = 11; //Pin connected to DS of 74HC595

void setup ()
{
pinMode(latchPin,OUTPUT);
pinMode(clockPin,OUTPUT);
pinMode(dataPin,OUTPUT);
}
void loop()
{
int dat = 0x18;
int dat2 = 0x81;

shiftOut(dataPin,clockPin,MSBFIRST,dat);
digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);
shiftOut(dataPin,clockPin,MSBFIRST,dat2);
digitalWrite(latchPin,HIGH);
delay(9);
digitalWrite(latchPin,LOW);
//__________________________________________________________________________________
dat = 0x7e ;/colonne/
dat2 = 0xe7; /righe/

shiftOut(dataPin,clockPin,MSBFIRST,dat);
digitalWrite(latchPin,HIGH);
(latchPin,LOW);
shiftOut(dataPin,clockPin,MSBFIRST,dat2);
digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);
delay(9);
}

(latchPin,LOW);

Please explain this mess.

Yes, that won't even compile, so it isn't the running sketch you are telling us about.

I'm really sorry.
Yes it is the running code I was talking about but i pasted it wrong :D.

const int latchPin = 8;//Pin connected to ST_CP of 74HC595
const int clockPin = 12;//Pin connected to SH_CP of 74HC595
const int dataPin = 11; //Pin connected to DS of 74HC595

              
void setup ()
{
  pinMode(latchPin,OUTPUT);
  pinMode(clockPin,OUTPUT);
  pinMode(dataPin,OUTPUT);
}
void loop()
{
int dat = 0x18;
int dat2 = 0x81;

shiftOut(dataPin,clockPin,MSBFIRST,dat);

digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);

shiftOut(dataPin,clockPin,MSBFIRST,dat2);

digitalWrite(latchPin,HIGH);
delay(9);
digitalWrite(latchPin,LOW);

//__________________________________________________________________________________    

dat = 0x7e ;/*colonne*/
dat2 = 0xe7; /*righe*/

shiftOut(dataPin,clockPin,MSBFIRST,dat);

digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);

shiftOut(dataPin,clockPin,MSBFIRST,dat2);

digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);

delay(9);
}

I don't see how that code could display scrolling letters... you need to explain better what it does, and what you want to change.

martuleia:
Hi guys!
I'm a newbie. I'm trying to display static letters on my 8x8 led matrix. I just tried to follow this idea:
SunFounder focuses on STEAM education with Open-Source robots

I managed to display scrolling letters but now I want to stop them. How can I change the code suggested by that tutorial?

or is there a better method to do the same thing?

I didn't succeded in stop them manipulating the code I suggested (link), but I somehow managed to display a "+" with the code I posted just above. I don't know if this is the smartest way to do it :(.
It draws 2 photograms extremely quickly: one represents 2 vertical lines,

int dat = 0x18;
int dat2 = 0x81;

shiftOut(dataPin,clockPin,MSBFIRST,dat);

digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);

shiftOut(dataPin,clockPin,MSBFIRST,dat2);

digitalWrite(latchPin,HIGH);
delay(9);

the second one 2 horizontal lines

dat = 0x7e ;/colonne/
dat2 = 0xe7; /righe/

shiftOut(dataPin,clockPin,MSBFIRST,dat);

digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);

shiftOut(dataPin,clockPin,MSBFIRST,dat2);

digitalWrite(latchPin,HIGH);
digitalWrite(latchPin,LOW);

delay(9);

The sunfounder code is just demo code. It's definitely not the smartest way to do it (in a way that would give you a useful display). Because the timing is done using for loops, you can't just stop it. Not simply.

There are 8x8 libraries out there, you should look for one.