I put line after analog reading
int b =79;
serial.print(b);
it did not change anything
after that I put another line:
lcd.setCursor(0,0);
lcd.print(" ";
nothing changed as well.
after that I added a new variable:
boolean lcd_clear=LOW;
//further code...
void loop()
{
if(lcd_clear==LOW){lcd.clear();lcd_clear=HIGH;}
//further code...
setPinValue = analogRead(setPin);
if ((setPinValue>=240)&&(setPinValue<420))//"Down" button pressed
{
if ((Program_Mode==HIGH)&&(Value_Mode==HIGH))
{Value-=Value_change;}//decrement value of the paramerer chosen
else {parameter--;}//decrement parameter's number
lcd_clear=LOW;//this line was extra added
}
//further code
}//end of void loop()
The problem disappeared. Have no idea, why it did not work originally?
Can somebody explain it?