https://github.com/einararnason/pydigipio
Python module for Raspberry Pi GPIO
https://github.com/einararnason/pydigipio
gpio linux python raspberry-pi
Last synced: 2 months ago
JSON representation
Python module for Raspberry Pi GPIO
- Host: GitHub
- URL: https://github.com/einararnason/pydigipio
- Owner: EinarArnason
- License: mit
- Created: 2020-04-20T00:49:09.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-11T15:32:28.000Z (about 4 years ago)
- Last Synced: 2025-03-17T13:49:11.505Z (2 months ago)
- Topics: gpio, linux, python, raspberry-pi
- Language: Python
- Homepage: https://pypi.org/project/PyDigiPio/
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PyDigiPio

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:
```bash
pip install PyDigiPio
```Usage:
```python
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