*** LCDKeypad.cpp.orig	2011-12-04 11:16:02.000000000 -0800
--- LCDKeypad.cpp	2011-12-11 14:45:02.000000000 -0800
*** 20,24 ****
      30, 150, 360, 535, 760     };
    int k, input;
!   input=analogRead(0);
    for (k = 0; k < NUM_KEYS; k++)
    {
--- 24,34 ----
      30, 150, 360, 535, 760     };
    int k, input;
!   {
!     // debounce with range 5, using idea from peterstrobl at http://www.dfrobot.com/forum/index.php?topic=31.0
!     input=analogRead(0);
!     delay(5);
!     int delta = (analogRead(0) - input);
!     if (abs(delta) > 5) return -1;
!   }
    for (k = 0; k < NUM_KEYS; k++)
    {
