Skip to main content

spx17979-driver

Python driver for the SparkFun SPX-17979 Qwiic Sound Trigger.

PyPI PyPI - License PyPI - Downloads

Installation

The package is available on PyPI. Installation is can be done with your favourite package manager. For example:

pip install spx17979-driver

Usage

In order to initialise the device we need an open SMBus object. Depending on the machine that you are running on you may need to provide another bus number or path:

from spx17979 import SPX17979
from smbus2 import SMBus


with SMBus(1) as bus:
    device = SPX17979(bus=bus)

When the device has been triggered by a sound, the trigger property will be True. It can be reset by calling the reset() method. That is it!

A simple usage example:

from time import sleep

from spx17979 import SPX17979
from smbus2 import SMBus


with SMBus(1) as bus:
    device = SPX17979(bus=bus)
    device.reset()
    
    while True:
        if device.trigger:
            print("Triggered!")
            sleep(0.5)  # Prevent triggering twice on the same sound
            device.reset()
        sleep(0.001)

Metadata

Release files for spx17979-driver 0.1.0

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

Source distribution (sdist)

Source distribution for spx17979-driver 0.1.0
File Size Uploaded Provenance
spx17979-driver-0.1.0.tar.gz 6.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spx17979-driver 0.1.0
File Interpreter ABI Platform
spx17979_driver-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / spx17979-driver-0.1.0.tar.gz

Download URL spx17979-driver-0.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9abfd3afcb99fe0c28177e9182d483b90f8188949fd9e420b0a054c244cc8a84
BLAKE2b-256 checksum
How to use checksums
b367abe2295e787e08b532ca3895e8575b6a8aa52dda15aeae045ed8b14c7940
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

Release files / spx17979_driver-0.1.0-py3-none-any.whl

Download URL spx17979_driver-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fb53b6c4c696e25639507a9076176133c555cde943fb68196137ea527951cfa
BLAKE2b-256 checksum
How to use checksums
7aeb1e2f0ce743db6eba6899ccc194129b2bae2db964ae1130ca3564e41ec58e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

Security for spx17979-driver 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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