GPIO NEXT
This is a python ctypes binding for libgpiod.
It's time to switch from the GPIO sysfs interface to gpiod to the linux GPIO character device (gpiod, stands for GPIO device)
Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use the character device instead. This library encapsulates the ioctl calls and data structures behind a straightforward API.
from kernel.org
Requirements
- libgpiod1
Install
sudo apt install libgpiod1
pip install gpio-next
Usage
- turn on/off an LED
import time
from gpio_next import Output
LED = Output(64, default_value=0)
for i in range(10):
LED.write(i & 1)
time.sleep(1)
- detect button events
from gpio_next import Input
button = Input(203)
for i in range(10):
print(button.wait())
print(button.read())
Metadata
Release files for gpio-next 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gpio-next-0.0.3.tar.gz | 4.6 kB | Without provenance | Details for gpio-next-0.0.3.tar.gz |
Release files / gpio-next-0.0.3.tar.gz
| Download URL | gpio-next-0.0.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7959817927d16fb7c2668a06f18ea536bdec27d32d72ca37a3b20c8d6a50efe
|
|
BLAKE2b-256 checksum How to use checksums |
e21cdd623219ffe5e63420494a7aa5e2550f68a415fb2506660851da1c703fdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.5.6
|
Security for gpio-next 0.0.3
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.