Added software debouncing for encoder button