need help adding debounce to my code

The link I gave you, is from my understanding, is what you're looking for.