Random rows/columns in a csv file and print text with typewriter effect

Almost!

Now first line appears for 5 seconds as does second…however I would like for there to be a blank screen after the second line appears - so a five second blank screen between iterations.

I tried to introduce another state to acheive this, but it just keeps the second line on screen for longer:


void draw() {
  switch (state) { 

    //this calls typeWriter1
  case 0:
    // this will be exectued if state = 0
    background (0); //background 
    typeWriter1();
    break; // break for case 0 


  case 1:
    //this is the break between typewriter 1 + 2 

    if (millis()-timer > 5000) { //if 5 seconds has passed 
      timer=millis();
      state=2;  // move on
    }
    break; //break for case 1 

    //this calls typeWriter2 
  case 2:
    background(0); //background 
    typeWriter2();
    break; //break for case 2

    //this should keep typewriter2 text on screen for 5 seconds 
  case 3: 

    if (millis()-timer > 5000) {
      timer=millis();
      state=4;
    }

    break;


    // trying to create a 5 second delay before iterations
  case 4: 

    if (millis()-timer > 5000) {
      timer=millis();
      state=5;
    }

    break;

    //this should wait 5 seconds before iteratating again. 
  case 5:
    if (millis()-timer > 5000) {
      timer=millis();
      selectRow();
      state=0;
    }
    break;
  }
}

Also, If I wanted to keep the first line on screen for the whole iteration, would I need to implement a boolean?

Thanks again.