Author Options:

help code problems i want to pause each word after is scrolls in for about half a sec or so Answered

I believe this is the section of code that needs to be altered?

// Plot each character of the message one column at a time, updated the display, shift bitmap left.
void AlphabetSoup1()
  char msg[] = "  Enjoy the Vittles  ";

  for (int charIndex=0; charIndex < (sizeof(msg)-1); charIndex++)
    int alphabetIndex = msg[charIndex] - ' ';
    if (alphabetIndex < 0) alphabetIndex=0;

    //-- Draw one character of the message --
    // Each character is only 5 columns wide, but I loop two more times to create 2 pixel space betwen characters
    for (int col = 0; col < 6; col++)
      for (int row = 0; row < 8; row++)
        // Set the pixel to what the alphabet say for columns 0 thru 4, but always leave columns 5 and 6 blank.
        bool isOn = 0;
        if (col<5) isOn = bitRead( alphabets[alphabetIndex][col], 7-row ) == 1;
        Plot( numCols-1, row, isOn); // We ALWAYS draw on the rightmost column, the shift loop below will scroll it leftward.
           //-- The more times you repeat this loop, the slower we would scroll --
      for (int refreshCount=0; refreshCount < 10; refreshCount++)

      //-- 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 as 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], 4, bitRead(bitmap[row][zone+1],0));



The forums are retiring in 2021 and are now closed for new topics and comments.

8 years ago

Detect the "space" character and parse that to start a timer, not mark out the character, when the timer expires, continue.