Skip to main content

Robot Framework Library for interfacing GPIO pins on executing robot files on Raspberry Pi's.

Project description

GPIOLibrary

pypi-badge build stable

Robot Framework Library for interfacing GPIO pins on executing robot files on Raspberry Pi's.

Requirements

Installation

Install RPi.GPIO with command below;

pip install RPi.GPIO

Then install GPIOLibrary with;

pip install robotframework-gpio

Example

*** 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

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

robotframework-gpio-0.1.0.tar.gz (8.1 kB view hashes)

Uploaded Source

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