Added a timer for debouncing. (does not work, will not clear the interrupt pending bits)