     // bit shift through the byte, set it in the buffer
     for (int row=0; row<7; row++) {
       if (b & (1 << row)) {        
-        bitSet(screenbuffer[activebuffer][row][bufferpointer], 31-charCol-bufferpos);
+        bitSet(screenbuffer[bufferpointer][row][bufferbyte], 31-charCol-bufferpos);
       }
       else {
-        bitClear(screenbuffer[activebuffer][row][bufferpointer], 31-charCol-bufferpos);
+        bitClear(screenbuffer[bufferpointer][row][bufferbyte], 31-charCol-bufferpos);
       }
     }
   }
 }
 
-void printString(char* source, byte pos, char bufferpointer) {
+void printString(char* source, byte pos, byte bufferpointer) {
   int i;
   for (i = 0; i < strlen(source); i++){
     printChar(source[i], pos+i*5, bufferpointer);

void updatescreen() {
  // 7 rows
  for (int i=0 ; i < 7; i++) {

    
/*    shiftOut(dataPin, clockPin, LSBFIRST, screenbuffer[activebuffer][i][1]);    
    shiftOut(dataPin, clockPin, LSBFIRST, screenbuffer[activebuffer][i][0]); 
    shiftOut(dataPin, clockPin, LSBFIRST, (screenbuffer[activebuffer][i][0] >> 8)); 
    shiftOut(dataPin, clockPin, LSBFIRST, (screenbuffer[activebuffer][i][0] >> 16));
    shiftOut(dataPin, clockPin, LSBFIRST, (screenbuffer[activebuffer][i][0] >> 24)); */
    
    // Update row.
    for (int j = 5; j >= 0; j--) {
      shiftOut(dataPin, clockPin, LSBFIRST, screenbuffer[activebuffer][i][j]); 
      shiftOut(dataPin, clockPin, LSBFIRST, (screenbuffer[activebuffer][i][j] >> 8)); 
      shiftOut(dataPin, clockPin, LSBFIRST, (screenbuffer[activebuffer][i][j] >> 16));
      shiftOut(dataPin, clockPin, LSBFIRST, (screenbuffer[activebuffer][i][j] >> 24)); 
    }

    // Turn off row.
    if (i == 0) {
      digitalWrite(19, 1);
    }
    else {   
      digitalWrite(i + 12, 1);
    }    
    // Flick the latch
    digitalWrite(latchPin, 1);
  //  delay(1);
    digitalWrite(latchPin, 0);
    // Turn on next row.
    digitalWrite(i + 13, 0);    
  }
}


  for (int charCol=0; charCol<5; charCol++) {
    byte b = font[ch][charCol];

    byte bufferbyte = (charCol+charPos)/32;
    bufferpos = charPos - (32 * bufferbyte);
        
    //  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
    // 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
