Debounces an arbitrary predicate function (typically created as a lambda) of 0 arguments. Since a very common use is debouncing a digital input pin, the initializer accepts a pin number instead of a lambda.
- Author(s): Dave Astels
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Debounce an input pin or an arbitrary predicate
Return the time since the most recent transition.
Return whether the debounced value went from high to low at the most recent update.
Return the amount of time the state was stable prior to the most recent transition.
Return whether the debounced value went from low to high at the most recent update.
Update the debouncer state. MUST be called frequently
Return the current debounced value.