Simple wrapper for bash commands to control GPIO.
Project description
GPIO control
This is a simple python wrapper for pinctrl sysfs interface. It is intended to be used on a Raspberry Pi.
Currently it only supports set and get pin state operations.
Because of how pinctrl works, there is no need to initialize pin direction.
Purpose
This wrapper was created to control a relay board using a Raspberry Pi. Using bash command keeps pin's state after the script ends.
Usage
from gpiocontrol import get, set, State
print(get(4)) # Get pin 4 state
set(4, State.HIGH) # Set pin 4 to HIGH
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpiocontrol-1.0.tar.gz.
File metadata
- Download URL: gpiocontrol-1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
584d6e36b42414c5e5dcd70c694498b24498949db49e41fd379703e482490179
|
|
| MD5 |
6872f410d2edb40eea223466db30923a
|
|
| BLAKE2b-256 |
0d707fb80115a3b5cfc67bb5f60a870e1ff8fa256008027a0153f384f9c1aadb
|
File details
Details for the file gpiocontrol-1.0-py3-none-any.whl.
File metadata
- Download URL: gpiocontrol-1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c661f1c1655c662c49255e8193686ebbc0386299cd7a6a78db2525e1b1dbad2
|
|
| MD5 |
cce611302157d805aa5893cc76371c63
|
|
| BLAKE2b-256 |
b268ea00e7703518b5380a5c8978da6ace2e5f907445dc10a417716cc70042e8
|