MEGA 2560 Lcd button press help?

Hello sorry if the title wasn’t very informative.
This is basically my first arduino project and ive been constructing full diy heated seats for my car controlled by the arduino, lcd and lm35 temp sensors.
All seems to be going well but i would like to see if its possible to hold text on the screen after the button press for around 2 seconds without delaying everything else in the loop.
In the code as soon as a button is pressed it displays another screen showing the actual temp and the set temp that you then increase/decrease, but as soon as you let off the button it reverts straight back to the drivers/passenger actual temp default screen.
if i increase the delay after the button press it stays o perfect but then it wont register the button again until after, so if you were to hold the button down it would be +1 wait 2 seconds +1 wait 2 seconds and so on.

Code: (a bit of a mashup)

#include <LiquidCrystal.h>
int des = 20;           //set temperature variable
int lastdes = 0;
int tempc = 0;          //temperature variable
int Counter1 = 0;       // counter for the number of button presses
int Counter2 = 0;       // counter for the number of button presses
int State1 = 0;         // current state of the button
int State2 = 0;         // current state of the button
int lastState1 = 0;     // previous state of the button
int lastState2 = 0;
int val = 0;

int des2 = 25;           //set temperature variable
int lastdes2 = 0;
int tempc2 = 0;          //temperature variable
int Counter3 = 0;       // counter for the number of button presses
int Counter4 = 0;       // counter for the number of button presses
int State3 = 0;         // current state of the button
int State4 = 0;         // current state of the button
int lastState3 = 0;     // previous state of the button
int lastState4 = 0;
int val2 = 0;
 



int pin = 1;            //LM35 input
int pin2 = 2;            //LM35 2 input
const int set1 = 24;     //temp up and temp down buttons
const int set2 = 25;
const int set3 = 22;     //temp up and temp down buttons
const int set4 = 23;
int heat = 0;           //output to heater control
int heat2 = 6;  
int ledPin = 9;

LiquidCrystal lcd(32, 33, 36, 37, 35, 34);    // initialize the library with the numbers of the interface pins

byte celciussymbol[8] = {
	0b01000,
	0b10100,
	0b01000,
	0b00000,
	0b00111,
	0b00100,
	0b00100,
	0b00111
};
byte leftline[8] = {
	0b11000,
	0b11000,
	0b11000,
	0b11000,
	0b11000,
	0b11000,
	0b11000,
	0b11000
};
byte rightline[8] = {
	0b00011,
	0b00011,
	0b00011,
	0b00011,
	0b00011,
	0b00011,
	0b00011,
	0b00011
};
byte leftarrow[8] = {
        B00011,
        B00110,
        B01100,
        B11111,
        B11111,
        B01100,
        B00110,
        B00011
};
byte rightarrow[8] = {
        B11000,
        B01100,
        B00110,
        B11111,
        B11111,
        B00110,
        B01100,
        B11000
};
byte line[8] = {
        B00000,
        B00000,
        B00000,
        B11111,
        B11111,
        B00000,
        B00000,
        B00000
};
byte rightthing[8] = {
	0b11111,
	0b11111,
	0b01111,
	0b01111,
	0b00111,
	0b00111,
	0b00011,
	0b00011
};
byte leftthing[8] = {
	0b11111,
	0b11111,
	0b11110,
	0b11110,
	0b11100,
	0b11100,
	0b11000,
	0b11000
};


void setup() {
  lcd.begin(16, 2);   // Set up the LCD's number of columns and rows:
  lcd.clear(); 
  analogReference(INTERNAL1V1);     
  pinMode(heat, OUTPUT);
  pinMode(heat2, OUTPUT);
  pinMode(set1, INPUT);
  pinMode(set2, INPUT);
  pinMode(set3, INPUT);
  pinMode(set4, INPUT);
  lcd.createChar(0, celciussymbol);
  lcd.createChar(1, leftline);
  lcd.createChar(2, rightline);
  lcd.createChar(3, leftarrow);
  lcd.createChar(4, rightarrow);
  lcd.createChar(5, line);
  lcd.createChar(6, rightthing);
  lcd.createChar(7, leftthing);
  for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) { 
  analogWrite(ledPin, fadeValue);
  lcd.setCursor(0, 0);
  lcd.print((char)7);  
  lcd.setCursor(4, 0);                                            // Set LCD cursor position (column, row)
  lcd.print("Mk4 Golf");                                          // Print text to LCD
  lcd.setCursor(15, 0);
  lcd.print((char)6);
  lcd.setCursor(0, 1);
  lcd.print((char)1);
  lcd.setCursor(2, 1);                                            // Set LCD cursor position (column,row) 
  lcd.print("Heated seats");                                      // Print text to LCD
  lcd.setCursor(15, 1);
  lcd.print((char)2);
  delay(30);                        
  } 
  delay(3000); // wait 300ms 
  lcd.clear();


}

void loop() {
State1 = digitalRead(set1);
  State2 = digitalRead(set2);  
  if (State1 != lastState1) {
        if (State1 == HIGH && des!= 65) {      //if up button is pressed, add 1 to des
        des++;
     } 
    
  }
  
  if (State2 != lastState2) {  //if down button is pressed, subtract 1 from des
       if (State2 == HIGH && des != 0) {
       des--; 
    }
  }
  analogRead(pin);
  delay(10);
  tempc = (100* (long)analogRead(pin)/1024.0);  //save temperature reading as 'tempc'
  delay(10);  //gives a range of about 30
  
State3 = digitalRead(set3);
  State4 = digitalRead(set4);  
  if (State3 != lastState3) {
        if (State3 == HIGH && des2!= 65) {      //if up button is pressed, add 1 to des
        des2++;
     } 
    
  }
  
  if (State4 != lastState4) {  //if down button is pressed, subtract 1 from des
       if (State4 == HIGH && des2 != 0) {
       des2--; 
    }
  }
  analogRead(pin2);
  delay(10);
  tempc2 = (100* (long)analogRead(pin2)/1024.0);  //save temperature reading as 'tempc'
  delay(10); 

       if (State1 == HIGH || State2 == HIGH) {
         //lcd.clear();
         lcd.setCursor(0, 0);
         lcd.print("ACTUAL TEMP");
         lcd.print((char)2);
         lcd.print((char)1);
         lcd.print("  ");
         lcd.setCursor(0, 1);
         lcd.print((char)3);
         lcd.print((char)5);
         lcd.print("  ");
         lcd.setCursor(3, 1);
         lcd.print("SET TEMP");
         lcd.print((char)2);
         lcd.print((char)1); 
         lcd.setCursor(13, 0);
         lcd.print(tempc);
         lcd.print((char)0);
         lcd.setCursor(13, 1);
         lcd.print(des);
         lcd.print((char)0); 
         delay(50);
     }  
       else if (State3 == HIGH || State4 == HIGH) {
         //lcd.clear();
         lcd.setCursor(0, 0);
         lcd.print("ACTUAL TEMP");
         lcd.print((char)2);
         lcd.print((char)1);
         lcd.print("  ");
         lcd.setCursor(0, 1);
         lcd.print((char)5);
         lcd.print((char)4);
         lcd.print("  ");
         lcd.setCursor(3, 1);
         lcd.print("SET TEMP");
         lcd.print((char)2);
         lcd.print((char)1); 
         lcd.setCursor(13, 0);
         lcd.print(tempc2);
         lcd.print((char)0);
         lcd.setCursor(13, 1);
         lcd.print(des2);
         lcd.print((char)0); 
         delay (50);
    } else {
  
  delay(100);
  lcd.setCursor(0,0);
  lcd.print("PASSEN ");
  lcd.print((char)2);
  lcd.print((char)1);
  lcd.print(" DRIVER ");
  lcd.setCursor(0, 1);
  lcd.print((char)3);
  lcd.print((char)5);
  lcd.print("  ");
  lcd.setCursor(3, 1);
  lcd.print("  ");    //clear field
  lcd.setCursor(3,1);
  lcd.print(tempc);  //print actual temperature
  lcd.print((char)0);
  lcd.print("  ");
  lcd.setCursor(7, 1);
  lcd.print((char)2);
  lcd.print((char)1);
  lcd.print("  ");
  lcd.setCursor(10, 1);
  lcd.print("   ");    //clear field
  lcd.setCursor(10, 1);
  lcd.print(tempc2);
  lcd.print((char)0);
  lcd.print("  ");
  lcd.setCursor(14, 1);
  lcd.print((char)5);
  lcd.print((char)4);
  
  
    }
delay(50);
  if(tempc <= des){                 //if actual temperature is less than
    digitalWrite(heat, HIGH);       //or equal to the set temperature, turn the heater on
    delay(50);
}
  else  if(tempc > des){             //otherwise leave the heater off
    digitalWrite(heat, LOW);
    
  }
delay(50);
  if(tempc2 <= des2){                 //if actual temperature is less than
    digitalWrite(heat2, HIGH);
    delay(50);
}
  else  if(tempc2 > des2){             //otherwise leave the heater off
    digitalWrite(heat2, LOW);
  
  }
}

Cheers

If I understand well, you need to run several things at the same time. Take a look at the link.

Ok makes sense if i ignore all of the stuff about leds and timing. So basically i need to call the functions in the loop and then call then like this.

void loop() {
something-about-switches();
something-about-the-lcd
}

void something-about-switches() {
   Something here
}

void something-about-the-lcd() {
   Something here
}

If so does that mean everything has to be in its own functions and i have to call all of the functions from the loop only? Cheers

Be careful, because the "timing stuffs" are the ones that make possible to have several things running at the same time.

This example is based in the Blink Without Delay example that uses the millis instead of the delay().

Yeah i just realised that, if i have to get my head around the millis and re-write alot of the code it may be easier to put up with the text going instantly for the moment.