Skip to content
CircuitPython pin or arbitrary predicate debouncer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs In response to comments Jan 5, 2019
.pylintrc Trying this again Jan 4, 2019
.travis.yml Trying this again Jan 4, 2019 Trying this again Jan 4, 2019
LICENSE Trying this again Jan 4, 2019
README.rst Rename properties to conform to lint rules Aug 14, 2019
requirements.txt Trying this again Jan 4, 2019



Documentation Status Discord Build Status

Debounces an arbitrary predicate function (typically created as a lambda) of 0 arguments. The constructor also accepts a digital pin as a convienence.


This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

import board
import digitalio
from adafruit_debouncer import Debouncer

pin = digitalio.DigitalInOut(board.D12)
pin.direction = digitalio.Direction.INPUT
pin.pull = digitalio.Pull.UP
switch = Debouncer(pin)

while True:
    if switch.fell:
        print('Just pressed')
    if switch.rose:
        print('Just released')
    if switch.value:
        print('not pressed')


Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.


For information on building library documentation, please check out this guide.

You can’t perform that action at this time.