Skip to main content

Python module for Raspberry Pi GPIO

Project description

PyDigiPio

Python package

Python module for Raspberry Pi GPIO

The What

This is a python module to interface with the digital inputs and output of the Raspberry Pi GPIO. Nothing more, nothing less.

The Why

Sometimes you just need digital I/O on the Raspberry Pi (and possibly other device, untested so far). This library provides direct access without the need of complex libraries.

The How

Install from PyPi:

pip install PyDigiPio

Usage:

import PyDigiPio

# Sets pin assigned to GPIO 1 as output
PyDigiPio.configure_pin(1, 'out')

# Set GPIO 1 HIGH
PyDigiPio.write_to_pin(1, True)
# Set GPIO 1 LOW
PyDigiPio.write_to_pin(1, False)

# Sets pin assigned to GPIO 2 as input
PyDigiPio.configure_pin(2, 'in')
# Get state of GPIO 2
PyDigiPio.read_from_pin(2)

OSError exception is thrown if GPIO device is configured incorrectly

The Who

Einar Arnason
https://github.com/EinarArnason/
https://www.linkedin.com/in/einararnason/

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

PyDigiPio-20.146.171707.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

PyDigiPio-20.146.171707-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

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