I bought the I2C LCD Shield kit, and needed to debounce the pins. Existing debounce code is based on reading inputs from pins ... I realized it would be useful to be able to 'debounce' any boolean variable, and thus created GeneralDebouncer library.
What does it need?
1. A function to return the current unbounced input that looks like this:
bool getRawInput(int buttonIndex);
2. Call update(); whenever you want to sample the buttons.
What does it give you?
It tells you the state of each button:
BUTTON_STATE_PRESSED: Button pressed
BUTTON_STATE_RELEASED: Button released
BUTTON_STATE_PRESSED_FROM_RELEASED: Button 'just' pressed
BUTTON_STATE_RELEASED_FROM_PRESSED: Button 'just' released
BUTTON_STATE_INVALID: Invalid button requested

