GPIOLibrary
Robot Framework Library for interfacing GPIO pins on executing robot files on Raspberry Pi's.
For Library documentation you can visit; https://yusufcanb.github.io/robotframework-gpio/
Requirements
Installation
Install RPi.GPIO with command below;
pip install RPi.GPIO
Then install GPIOLibrary with;
pip install robotframework-gpio
Examples
You can find example robot files in the /examples directory.
Basic Usage
*** Settings ***
Documentation Test LED is fully functional
Library GPIOLibrary
Suite Setup Begin GPIO Test
*** Variables ***
${LED_PIN} 17
*** Test Cases ***
LED Should On
Set Output Pin ${LED_PIN}
Set Pin High ${LED_PIN}
${pin_status}= Get Pin Status ${LED_PIN}
Should Be Equal As Integers ${pin_status} 1
LED Should Off
Set Output Pin ${LED_PIN}
Set Pin Low ${LED_PIN}
${pin_status}= Get Pin Status ${LED_PIN}
Should Be Equal As Integers ${pin_status} 1
*** Keywords ***
Begin GPIO Test
Set Mode BCM
Set Warnings Off
Remote Library Usage
First install robotframework/PythonRemoteServer to Raspberry Pi;
pip install robotremoteserver
Then, start remote library server with following commands;
from robotremoteserver import RobotRemoteServer
from GPIOLibrary import GPIOLibrary
RobotRemoteServer(GPIOLibrary(), host='0.0.0.0')
Finally, you can execute the robot file below from any machine within the same network of Raspberry Pi.
*** Settings ***
Documentation Example robot file for using GPIOLibrary on a remote Raspberry Pi device
Library Remote http://${ADDRESS}:${PORT}
Library Dialogs
Suite Setup Begin GPIO Test
*** Variables ***
${ADDRESS} raspberrypi.local
${PORT} 8270
${LED_PIN} 17
*** Test Cases ***
LED Should On
Set Output Pin ${LED_PIN}
Set Pin High ${LED_PIN}
Execute Manual Step LED is on?
LED Should Off
Set Output Pin ${LED_PIN}
Set Pin Low ${LED_PIN}
Execute Manual Step LED is off?
*** Keywords ***
Begin GPIO Test
Set Mode BCM
Set Warnings Off
Metadata
Release files for robotframework-gpio 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| robotframework-gpio-0.2.0.tar.gz | 8.8 kB | Without provenance | Details |
Release files / robotframework-gpio-0.2.0.tar.gz
| Download URL | robotframework-gpio-0.2.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d0c253f7fe6ca1a8ef0e085f302e691acf016a66cedae747ebbff42c4edb1df
|
|
BLAKE2b-256 checksum How to use checksums |
8a4af415670a8e02cac8396c2b22c68f99d28262d76e2c5c662feba6611c1df0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.8.2 requests/2.26.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
|
Security for robotframework-gpio 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.