Button debouncing using bit shifting

While a long read, and more than you wanted, I recommend:

That is a thorough background, while the second half details what you want, I think. They're best read together, with a vat of coffee at hand.

3 Likes