Debouncing the analog inputs