Skip to main content

Introduction

Documentation Status Discord Build Status Code Style: Ruff

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

Dependencies

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:
    switch.update()
    if switch.fell:
        print('Just pressed')
    if switch.rose:
        print('Just released')
    if switch.value:
        print('not pressed')
    else:
        print('pressed')

Documentation

API documentation for this library can be found on Read the Docs.

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

Contributing

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

Metadata

Release files for adafruit-circuitpython-debouncer 2.0.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adafruit-circuitpython-debouncer 2.0.15
File Size Uploaded
adafruit_circuitpython_debouncer-2.0.15.tar.gz 25.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adafruit-circuitpython-debouncer 2.0.15
File Interpreter ABI Platform
adafruit_circuitpython_debouncer-2.0.15-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / adafruit_circuitpython_debouncer-2.0.15.tar.gz

Download URL adafruit_circuitpython_debouncer-2.0.15.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e4706471d59377d379002a762c1316c0024e71e17b5380b980450f6623bc3a7c
BLAKE2b-256 checksum
How to use checksums
a06e82f2aef6bd65e9a205715a8f62ccb72b95185dc40d42c03a93bb316b144c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / adafruit_circuitpython_debouncer-2.0.15-py3-none-any.whl

Download URL adafruit_circuitpython_debouncer-2.0.15-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc9d25243bd8e301db8176a4b30140a0b5f6036c6c2c07874456e26e6f27b95e
BLAKE2b-256 checksum
How to use checksums
47ac79bbe7e07e0d1ed8d493e787e9cf8e052e08d66b3834b397502a062e95a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

2.0.15 This release

2 release files

2.0.14

2 release files

2.0.13

2 release files

2.0.12

2 release files

2.0.11

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.6.0

1 release file

1.5.0

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.13

1 release file

1.3.12

1 release file

1.3.11

1 release file

1.3.10

1 release file

1.3.9

1 release file

1.3.8

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page