I put line after analog reading
int b =79;
serial.print(b);
it did not change anything
Of course not. The idea was to print the value read from the sensor (switches).
You still have no idea what value is being returned by the analogRead function. So, you still have no idea whether the block of code after the if test after the analogRead (where you call lcd.clear()) is being executed.
after that I put another line:
lcd.setCursor(0,0);
lcd.print(" ";
nothing changed as well.
Well, of course not. You still aren't calling lcd.clear().
after that I added a new variable:
boolean lcd_clear=LOW;
if(lcd_clear==LOW){lcd.clear();lcd_clear=HIGH;}
So, NOW you're calling lcd.clear(), and the screen clears. And you wonder why?