Skip to content
/ zorg-gpio Public

GPIO drivers for controlling sensors and output devices with Zorg.

Notifications You must be signed in to change notification settings

zorg/zorg-gpio

Repository files navigation

zorg-gpio

Join the chat at https://gitter.im/zorg/zorg Package Version Requirements Status Build Status Code Climate Coverage Status

Zorg (https://zorg.github.io/) is a Python framework for robotics and physical computing.

This module provides drivers for General Purpose Input/Output (GPIO) devices. Typically, this library is registered by an adaptor class such as zorg-edison that supports the needed interfaces for GPIO devices.

Getting Started

Install the module with: pip install zorg zorg-gpio

Example

import time
import zorg


def blink_led(my):
    while True:
        my.led.toggle()
        time.sleep(100)

robot = zorg.robot({
    "name": "Test",
    "connections": {
        "edison": {
            "adaptor": "zorg_edison.Edison",
        },
    },
    "devices": {
        "led": {
            "connection": "edison",
            "driver": "zorg_gpio.Led",
            "pin": 4, # Digital pin 4
        },
    },
    "work": blink_led,
})

robot.start()

Hardware Support

Zorg has a extensible system for connecting to hardware devices. The following GPIO devices are currently supported:

Open a new issue to request support for additional components.

License

Copyright (c) 2015 Team Zorg

About

GPIO drivers for controlling sensors and output devices with Zorg.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages