LED 8x8 Matrix Scrolling Text - Laufschrift für ein Standbild unterbrechen

Hallo !

Aus dem Internet habe ich einen Sketch für eine Laufschrift mit Unterstützung aus der Gemeinde tatsächlich zum Laufen gebracht. Jetzt möchte ich, dass die Laufschrift für einen festzulegenen Zeitraum anhält und in schneller Folge ohne Scrolling Bilder zeigt (Herzschlag, Smilies mit Augenschlag etc.). Die zugehörigen Bitmaps bekomme ich hin. Aber wie unterbreche ich das Programm oder welche Funktion lässt die Standbilder aufleuchten?

Danke für jede Unterstützung!

Der Code mit wenigen Bitmaps lautet bisher:

int x;
int y;
int i=0;
int k = 0;
int latchPin1 = 5; //Arduino pin connected to blue 12 RCLK of 74HC595  speicherPin = ST_CP
int clockPin1 = 6; //Arduino pin connected to green 11 SRCLK of 74HC595 taktPin = SH_CP
int dataPin1 = 7;  //Arduino pin connected to violet 14 SER of 74HC595 datenPin = DS

//-- Rows (Positive Anodes) --
int latchPin2 = 9; //Arduino pin connected to yellow Latch 12 RCLK of 74HC595
int clockPin2 = 10; //Arduino pin connected to white Clock 11 SRCLK of 74HC595
int dataPin2 = 8;  //Arduino pin connected to grey Data 14 SER of 74HC595

//=== B I T M A P ===
//Bits in this array represents one LED of the matrix
// 8 is # of rows, 7 is # of LED matrix we have
byte bitmap[8][8]; // Change the 7 to however many matrices you want to use. 
//byte bitmap [8][16] Matrix von 8 Zeilen und 16 Spalten (= 2 Stück 8x8 Matrices)
int numZones = sizeof(bitmap) / 8; //hier numZones = 8. HIER: sizeof(bitmap)=64
int maxZoneIndex = numZones-1; // maxZoneIndex = 7
int numCols = numZones * 8;

byte alphabets[][5] = {
  {0,0,0,0,0},//ASCII-Zeichen Nummer 32 = Space
  {0, 0, 61,0,0},// Nr 33 = !
{0,0,0,0,0}; 
 {126, 1, 1, 1, 126},//85
  {124, 2, 1, 2, 124},
  {126, 1, 6, 1, 126},
  {99, 20, 8, 20, 99},
  {96, 16, 15, 16, 96},
  {67, 69, 73, 81, 97},//90 = Z
  };

 // **************** Heartbeat Bytes ************************************************ 
  byte Hearts[2][8] = {
    {B01110000, B11111000, B11111100, B01111110, B01111110, 
     B11111100, B11111000, B01110000}, // großes Herz
    {B00000000, B00000000, B00011000, B00111100, B00011110,
     B00111100, B00011000, B00000000}, // kleines Herz 
    };
    
 
//=== S E T U P ===

void setup() {
  pinMode(latchPin1, OUTPUT);
  pinMode(clockPin1, OUTPUT);
  pinMode(dataPin1, OUTPUT);

  pinMode(latchPin2, OUTPUT); //ST_CP
  pinMode(clockPin2, OUTPUT); //SH_CP
  pinMode(dataPin2, OUTPUT);  // DS
  
 
  //-- Clear bitmap --
  for (int row = 0; row < 8; row++) {
    for (int zone = 0; zone <= maxZoneIndex; zone++) {
      bitmap[row][zone] = 0;
    }
  }
}

//=== F U N C T I O N S ===
// This routine takes whatever we've setup in the bitmap array and display it on the matrix
void RefreshDisplay()
{
  for (int row = 0; row < 8; row++) {
    int rowbit = 1 << row;
    digitalWrite(latchPin2, LOW);  // speicherPin ST_CP  Hold latchPin LOW for as long as we're transmitting data
    shiftOut(dataPin2, clockPin2, MSBFIRST, rowbit);   //Transmit data
    //        DS       takt SH_CP         

    //-- Start sending column bytes --
    digitalWrite(latchPin1, LOW);  //Hold latchPin LOW for as long as we're transmitting data

    //-- Shift out to each matrix (zone is 8 columns represented by one matrix)
    for (int zone = maxZoneIndex; zone >= 0; zone--) {
      shiftOut(dataPin1, clockPin1, MSBFIRST, bitmap[row][zone]);
    }

    //-- Done sending Column bytes, flip both latches at once to eliminate flicker
    digitalWrite(latchPin1, HIGH);
    digitalWrite(latchPin2, HIGH);

    //-- Wait a little bit to let humans see what we've pushed out onto the matrix --
    delayMicroseconds(500);
  }
}

// Converts row and colum to actual bitmap bit and turn it off/on
void Plot(int col, int row, bool isOn)
{
  int zone = col / 8;
  int colBitIndex = x % 8;
  byte colBit = 1 << colBitIndex;
  if (isOn)
    bitmap[row][zone] =  bitmap[y][zone] | colBit;
  else
    bitmap[row][zone] =  bitmap[y][zone] & (~colBit);
}


// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void Nordkoordinate()
{
  char msg[] = " N 51*59.456 ";


  for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)
  {
    int alphabetIndex = msg[charIndex] - 32;  // 32 = ASCII-Wert von SPACE
    if (alphabetIndex < 0) alphabetIndex=0;
    
   
    //-- Draw one character of the message --
    for (int col = 0; col < 6; col++)
    {
      for (int row = 0; row < 8; row++)
      {
        bool isOn = 0;
        if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;
        Plot( numCols-1, row, !isOn);
      }
     
      //-- The more times you repeat this loop, the slower we would scroll --
      for (int refreshCount=0; refreshCount < 10; refreshCount++) //change  this value to vary speed
        RefreshDisplay();
      //-- Shift the bitmap one column to left --
      for (int row=0; row<8; row++)
      {
        for (int zone=0; zone < numZones; zone++)
        {
          bitmap[row][zone] = bitmap[row][zone] >> 1;
                    // Roll over lowest bit from the next zone as highest bit of this zone.
          if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7, bitRead(bitmap[row][zone+1],0));
        }
      }
    }
  }
}
// ###############  Testbereich heartBeat #################################    
void showHeartBeat()
{
  //Leerzeichen = großes Herz (ASCII Nr 32), ! = (ASCII Nr 33) = kleines Herz
  char msgHeart[] = "! "; //Anzahl der Leerzeichen zw. "" = Anzahl gezeigte Herzen

  for (int charHeartIndex=0; charHeartIndex < (sizeof(msgHeart)-1); charHeartIndex++)
  {
    int heartBeatIndex = msgHeart[charHeartIndex] - 32; // heartBeatIndex = ASCII Nr des Zeichens - 32 (32 = ASCII Nr von SPACE)
    if (heartBeatIndex < 0) heartBeatIndex=0;
        
     //-- Draw one character of the message --
    for (int col = 0; col < 8; col++)
    {
      for (int row = 0; row < 8; row++)
      {
        bool isOn = 0;
        if (col<9) isOn = bitRead( Hearts[heartBeatIndex][col],8-row ) == 1;
        Plot( numCols-1, row, !isOn);
       
      }
     
      //-- The more times you repeat this loop, the slower we would scroll --
      for (int refreshCount=0; refreshCount < 10; refreshCount++) //change  this value to vary speed
        RefreshDisplay();
      //-- Shift the bitmap one column to left --
     for (int row=0; row<8; row++)
      {
        for (int zone=0; zone < numZones; zone++)
        {
          //This right shift would show a left scroll on display, because leftmost column is represented by least significant bit of the byte.
         bitmap[row][zone] = bitmap[row][zone] >> 1;
                    // Roll over lowest bit from the next zone as highest bit of this zone.
          if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7, bitRead(bitmap[row][zone+1],0));
        
         }
      }
    }
  }
}
// Ende Testbereich    
//  #########################################################################    


//################################################################
// *******************Neuer Testbereich Herzschlag**********************************

    

//****************** Ende Testbreich Herzschlag *************************************************
//#########################################################################################


// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void Ostkoordinate()
{
  char msg[] = " E 007*16.123 ";
  int i = sizeof(msg);

  for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)
  {
    int alphabetIndex = msg[charIndex] - 32;  // 32 = ASCII-Wert von SPACE
    if (alphabetIndex < 0) alphabetIndex=0;
    
   
    //-- Draw one character of the message --
    for (int col = 0; col < 6; col++)
    {
      for (int row = 0; row < 8; row++)
      {
        bool isOn = 0;
        if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;
        Plot( numCols-1, row, !isOn);
      }
     
      //-- The more times you repeat this loop, the slower we would scroll --
      for (int refreshCount=0; refreshCount < 10; refreshCount++) //change  this value to vary speed
        RefreshDisplay();
      //-- Shift the bitmap one column to left --
      for (int row=0; row<8; row++)
      {
        for (int zone=0; zone < numZones; zone++)
        {
          bitmap[row][zone] = bitmap[row][zone] >> 1;
                    // Roll over lowest bit from the next zone as highest bit of this zone.
          if (zone < maxZoneIndex) bitWrite(bitmap[row][zone], 7, bitRead(bitmap[row][zone+1],0));
        }
      }
    }
  }
}


//=== L O O P ===
void loop() {
  showHeartBeat();
  Nordkoordinate();
  showHeartBeat();
  Ostkoordinate();
}