Strange count effect.

Hi,

lcd.clear();

May eventually cause your display to flicker as you get it to display more characters.

 switch (lcd_key)
  {
   case btnUP:
      {
        tempval++;
        lcd.setCursor(0, 1);
        lcd.print("   ");
        lcd.setCursor(0, 1);
        lcd.print(tempval);
        delay(250);
        break;
      } 
      
      case btnDOWN:
      {
        tempval--;
        lcd.setCursor(0, 1);
        lcd.print("   ");
        lcd.setCursor(0, 1);
        lcd.print(tempval);
        delay(250);
        break;
      }
  }

Will be better as it overwrites the old digits with spaces before you write the new data, and leaves the rest of the display alone.

Tom... :slight_smile: