Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpiocontrol-1.1.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpiocontrol-1.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file gpiocontrol-1.1.tar.gz.

File metadata

  • Download URL: gpiocontrol-1.1.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

Hashes for gpiocontrol-1.1.tar.gz
Algorithm Hash digest
SHA256 b15c5ba55f6060a883155ea43ddae0978c99ca14fbd30a3725d0112f499926fc
MD5 8d952db70f84c7b5438f6dfbde5cc5d6
BLAKE2b-256 14cba611648cbebf9103c316c20018a75f2378ab6338a0d9bc58a490d49a3e7a

See more details on using hashes here.

File details

Details for the file gpiocontrol-1.1-py3-none-any.whl.

File metadata

  • Download URL: gpiocontrol-1.1-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

Hashes for gpiocontrol-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eade85b14a4b1816cfad5476f1eb95dd541bd10083e2136acb133ca6f27e6f37
MD5 6ef5f87830f0a783af888c5a1296df3a
BLAKE2b-256 29043d20fb74f5b1595e0ed18d80dcf5aa752e0d2cf69cecc1a5b326cc0c0ec6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page