How to stop changes ?

From the code in post 34

 lcd.print(vin, 3);

Is it important that you print this value in base 3?

Then there's this very obvious flaw.

  if(currState != prevState);

You've fixed that, right?