A very simple code, but it has been killing me for the past 2 weeks. 

Simply put: Button Up press increments State by 1. Button Down press decrements State by 1.

```
...

boolean ButtonPress;
const int PinUp = 3;   
const int PinDown = 2;  
int UpVal = 0;     
int DownVal = 0;   
int State = 0;

void setup()
{      
  pinMode(PinUp, INPUT);
  pinMode(PinDown, INPUT);
}

void loop()
{
  UpVal = digitalRead(PinUp);  
  DownVal = digitalRead(PinDown);

  if(DownVal == HIGH  && UpVal == LOW) 
  {
    lcd.clear();
    State++;
    ButtonPress = true;
  }
  if(UpVal == HIGH  && DownVal == LOW) 
  {
    lcd.clear();
    State--;
    ButtonPress = true;
  }
  if(ButtonPress == true)
  {
    lcd.setCursor(10, 0);
    lcd.print("State =  ");
    lcd.setCursor(18, 0);
    lcd.print(State);
  }
}

```

The problem is, the incrementing or decrementing jumps wildly to a seemingly random number. 

If State is at 1 and I increment up, instead of getting 2, State can become anything upward such as 5 13 or 9. It's a random. 

Similarly if I decrement from 1, instead of getting 0, State can become anything downward such as -6 -2 or - 10. This is random as well. 

The only major part of the code I did not include was the means of outputting onto my 20, 4 LCD. 

What is wrong here?