Integrator debouce method for digital inputs on microcontrollers