Debouncer.h#
Description#
The
Debouncerclass is used to perform debouncing for the electrical signals resulting from any mechanical buttons, usually on the PS5 controller.

Generally, inside a loop, wrap your call to check the input needing debouncing with one of the available functions.
The class is also designed to work with either active high or active low circuits.
Internally, this is stored in the
BASE_STATEandACTIVE_STATEprivate fields, assigned appropriately based on ifactiveLowistrueorfalse(defaultfalse) in the constructor.This corresponds to the
enum DebouncerStatewith valuesbase,active