There are a few libraries that do button handling and among other things, take care of debouncing.

Search for "button" in the library manager.

Button2 is the one I used in my last project


Edited by elperepat (25/11/2022 01:08)
_________________________
Patrick