Name | gpio JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | gpio access via the standard linux sysfs interface |
upload_time | 2023-02-13 12:11:31 |
maintainer | |
docs_url | None |
author | Garrett Berg, Phil Howard |
requires_python | >=2.7 |
license | MIT |
keywords |
gpio
sysfs
linux
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# Linux [sysfs](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) gpio access
This library provides gpio access via the standard linux [sysfs interface](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt)
It is intended to mimick [RPIO](http://pythonhosted.org/RPIO/) as much as possible
for all features, while also supporting additional (and better named) functionality
to the same methods.
## Supported Features
- get pin values with `read(pin)` or `input(pin)`
- set pin values with `write(pin, value)`, `set(pin, value)` or `output(pin, value)`
- get the pin mode with `mode(pin)`
- set the pin mode with `setup(pin, mode)`
- `mode` can currently equal `gpio.IN` or `gpio.OUT`
- create a `GPIOPin` class directly to `write` and `read` a pin
## Examples
### RPi.GPIO Drop-in
Good for up to 130KHz pin toggle on a Pi 400.
```python
import time
import gpio as GPIO
GPIO.setup(14, GPIO.OUT)
while True:
GPIO.output(14, GPIO.HIGH)
time.sleep(1.0)
GPIO.output(14, GPIO.LOW)
time.sleep(1.0)
```
### Use GPIOPin directly
Good for up to 160KHz pin toggle on a Pi 400.
This gives you a class instance you can manipulate directly, eliminating the lookup:
```python
import gpio
pin = gpio.GPIOPin(14, gpio.OUT)
while True:
pin.write(14, GPIO.HIGH)
time.sleep(1.0)
pin.write(14, GPIO.LOW)
time.sleep(1.0)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "gpio",
"maintainer": "",
"docs_url": null,
"requires_python": ">=2.7",
"maintainer_email": "",
"keywords": "gpio sysfs linux",
"author": "Garrett Berg, Phil Howard",
"author_email": "phil@pimoroni.com",
"download_url": "https://files.pythonhosted.org/packages/3d/14/12f7715abee718d57757519edac43ff57370ae5e2aea03cb75fe14fb2ff4/gpio-1.0.0.tar.gz",
"platform": null,
"description": "# Linux [sysfs](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt) gpio access\n\nThis library provides gpio access via the standard linux [sysfs interface](https://www.kernel.org/doc/Documentation/gpio/sysfs.txt)\n\nIt is intended to mimick [RPIO](http://pythonhosted.org/RPIO/) as much as possible \nfor all features, while also supporting additional (and better named) functionality \nto the same methods.\n\n## Supported Features\n\n- get pin values with `read(pin)` or `input(pin)`\n- set pin values with `write(pin, value)`, `set(pin, value)` or `output(pin, value)`\n- get the pin mode with `mode(pin)`\n- set the pin mode with `setup(pin, mode)`\n - `mode` can currently equal `gpio.IN` or `gpio.OUT`\n- create a `GPIOPin` class directly to `write` and `read` a pin\n\n## Examples\n\n### RPi.GPIO Drop-in\n\nGood for up to 130KHz pin toggle on a Pi 400.\n\n```python\nimport time\n\nimport gpio as GPIO\n\nGPIO.setup(14, GPIO.OUT)\n\nwhile True:\n GPIO.output(14, GPIO.HIGH)\n time.sleep(1.0)\n GPIO.output(14, GPIO.LOW)\n time.sleep(1.0)\n```\n\n### Use GPIOPin directly\n\nGood for up to 160KHz pin toggle on a Pi 400.\n\nThis gives you a class instance you can manipulate directly, eliminating the lookup:\n\n```python\nimport gpio\n\npin = gpio.GPIOPin(14, gpio.OUT)\n\nwhile True:\n pin.write(14, GPIO.HIGH)\n time.sleep(1.0)\n pin.write(14, GPIO.LOW)\n time.sleep(1.0)\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "gpio access via the standard linux sysfs interface",
"version": "1.0.0",
"project_urls": {
"GitHub": "https://github.com/vitiral/gpio"
},
"split_keywords": [
"gpio",
"sysfs",
"linux"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "196855f18a729289c413102ec9c9d21ac5a34c9b8fdbf28d8ee0b51052527b52",
"md5": "146c4b10fcc9b4879c5ca0c37909b28d",
"sha256": "25afec3f69c47d4b1253ab5b525abe48db6488331c77bda4b85c84b58343e9c2"
},
"downloads": -1,
"filename": "gpio-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "146c4b10fcc9b4879c5ca0c37909b28d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2.7",
"size": 5364,
"upload_time": "2023-02-13T12:11:29",
"upload_time_iso_8601": "2023-02-13T12:11:29.922495Z",
"url": "https://files.pythonhosted.org/packages/19/68/55f18a729289c413102ec9c9d21ac5a34c9b8fdbf28d8ee0b51052527b52/gpio-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d1412f7715abee718d57757519edac43ff57370ae5e2aea03cb75fe14fb2ff4",
"md5": "270558d8c137209eb3f3597efcf07310",
"sha256": "4d2de56cfde25fb1a6d71dbd60da59698cc9dabe9bcabf3548aa8e22ecf1cea3"
},
"downloads": -1,
"filename": "gpio-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "270558d8c137209eb3f3597efcf07310",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 5261,
"upload_time": "2023-02-13T12:11:31",
"upload_time_iso_8601": "2023-02-13T12:11:31.633016Z",
"url": "https://files.pythonhosted.org/packages/3d/14/12f7715abee718d57757519edac43ff57370ae5e2aea03cb75fe14fb2ff4/gpio-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-13 12:11:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vitiral",
"github_project": "gpio",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "gpio"
}