TVout coding question

Hello all.
I was hoping my first post would be with a completed sketch, but I raninto an issue.

if (pagenumber==0) {

// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print(" 12:00:00 “);
lcd.setCursor(0, 1);
lcd.print(” 01/01/2011 “);
lcd.setCursor(0, 2);
lcd.print(” “);
lcd.setCursor(0, 3);
lcd.print(” ");
lcd.print(temperatureF);
lcd.print((char)223);
lcd.print("F - ");
lcd.print(temperatureC);
lcd.print((char)223);
lcd.print("C ");

TV.println(10,0,“Voltage Here”);
TV.println(10,5,“Oil PSI Here”);
TV.println(5,10,“TemperatureF”);
TV.println(15,10,(char)223);

}

//PAGE 1

if (pagenumber==1) {

// Print a message to the LCD.
lcd.print(“POR ENGINE START”);
lcd.setCursor(0, 1);
lcd.print(" ");
TV.clear_screen();
TV.println(0,5,“POR Engine Start”);

if (enginestart<1) {
lcd.print(“STARTING”);
TV.println(0,6,“STARTING”);
TV.clear_screen();
}
else {
lcd.print(" READY");
TV.println(0,6," READY");
}

My issue is simple, but for the life of me, ran into a mental block to think of the correct code to fix it.
I want each page to remain until the next or prev buttons are pressed. I have an issue where the page texts displaying on the TVout are not waiting to see prev or next button press, so after about 3 seconds, the screen is unreadable, as its jumbling up all the pages onto one screen.

I tried TVclear_screen, but it posed no affect.
FYI: there is no problem from the LCD doing this. Its only affecting the monitor output.

Thanks y’all.

My issue is simple, but for the life of me, ran into a mental block to think of the correct code to fix it.
I want each page to remain until the next or prev buttons are pressed. I have an issue where the page texts displaying on the TVout are not waiting to see prev or next button press, so after about 3 seconds, the screen is unreadable, as its jumbling up all the pages onto one screen.

I tried TVclear_screen, but it posed no affect.
FYI: there is no problem from the LCD doing this. Its only affecting the monitor output.

Boy post full information (Code) and this very limited info. What i find to check condition on pagenumber use "if elseif elseif else" statements.

if (pagenumber==0) {

// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print(" 12:00:00 “);
lcd.setCursor(0, 1);
lcd.print(” 01/01/2011 “);
lcd.setCursor(0, 2);
lcd.print(” “);
lcd.setCursor(0, 3);
lcd.print(” ");
lcd.print(temperatureF);
lcd.print((char)223);
lcd.print("F - ");
lcd.print(temperatureC);
lcd.print((char)223);
lcd.print("C ");

TV.println(10,0,“Voltage Here”);
TV.println(10,5,“Oil PSI Here”);
TV.println(5,10,“TemperatureF”);
TV.println(15,10,(char)223);

}

//PAGE 1

if (pagenumber==1) {

// Print a message to the LCD.
lcd.print(“POR ENGINE START”);
lcd.setCursor(0, 1);
lcd.print(" ");
TV.clear_screen();
TV.println(0,5,“POR Engine Start”);

if (enginestart<1) {
lcd.print(“STARTING”);
TV.println(0,6,“STARTING”);
TV.clear_screen();
}
else {
lcd.print(" READY");
TV.println(0,6," READY");
}

Wont copy full code. Max char limit in forum reached.
I can email?

//PAGE 0
  
  if (pagenumber==0) {
  
  
  //  Print a message to the LCD.
  lcd.setCursor(0, 0);
  lcd.print("      12:00:00      ");   
  lcd.setCursor(0, 1);
  lcd.print("     01/01/2011     ");
  lcd.setCursor(0, 2);
  lcd.print("                    ");
  lcd.setCursor(0, 3);
  lcd.print(" ");
  lcd.print(temperatureF);
  lcd.print((char)223);
  lcd.print("F - ");
  lcd.print(temperatureC);
  lcd.print((char)223);
  lcd.print("C  ");
  
  TV.println(10,0,"Voltage Here");
  TV.println(10,5,"Oil PSI Here");
  TV.println(5,10,"TemperatureF");
  TV.println(15,10,(char)223);

}
  
    

  
  
  
  
  //PAGE 1
  
  if (pagenumber==1) {
  
  
  //  Print a message to the LCD.
  lcd.print("POR     ENGINE START");   
  lcd.setCursor(0, 1);
  lcd.print("         ");
  TV.clear_screen();
  TV.println(0,5,"POR    Engine Start");
  
    if (enginestart<1) {
    lcd.print("STARTING");
    TV.println(0,6,"STARTING");
    TV.clear_screen();
  }
  else {
    lcd.print("   READY");
    TV.println(0,6,"  READY");
  } 
  
  if (por<1) {
    lcd.print("ON ");
  }
  else {
    lcd.print("OFF");
  }
  

  lcd.setCursor(0, 2);
  lcd.print("       EXT.       ");
  lcd.setCursor(0, 3);
if (remote<1) {
    lcd.print("!REMOTE!");
  }
  else {
    lcd.print(" REMOTE ");
  }    
  lcd.print("      ");
  
  
    if (horn<1) {
    lcd.print("!HORN!");
  }
  else {
    lcd.print(" HORN ");
  } 
 
  }
  
    

  
  
  
  //PAGE 2 
  
  
  if (pagenumber==2) {
  
  
  
  //  Print a message to the LCD.
  lcd.print("ACC SCKT     SCANNER");   
  lcd.setCursor(0, 1);
  
  
  if (accsckt<1) {
    lcd.print("ON ");
  }
  else {
    lcd.print("OFF");
  }    
  lcd.print("              ");
  
  
    if (scanner<1) {
    lcd.print(" ON");
  }
  else {
    lcd.print("OFF");
  } 
  
  

  lcd.setCursor(0, 2);
  lcd.print("RADIO        STROBES");
  lcd.setCursor(0, 3);
if (radio<1) {
    lcd.print("ON ");
  }
  else {
    lcd.print("OFF");
  }    
  lcd.print("              ");
  
  
    if (strobes<1) {
    lcd.print(" ON");
  }
  else {
    lcd.print("OFF");
  } 

 
  
  }

I can email?

No. You can use the Additional Options link below the text entry box. Yes, it's a link, even though it doesn't look like one. When you click it, you'll see an option to attach a file to a post.

Thnks. Still not used to this forums design.

Rework_Of_Buggy_Control.ino (16.8 KB)

You can't use reading and previous to refer to the current and previous reading for all the switches, and think that the Arduino is going to somehow magically infer that you expect it to remember the previous reading for several switches.

That code that tries to combine edge detection, current state, and debounce all in one if statement is horrid. You are trying to do three different things. You should be using three if statements.

You should put all the { on new lines, and use Tools + Auto Format to make that code at least somewhat readable.

A little white space is good. Many blank lines looks silly.