Skip to main content

Webservice to control a Numato lab USB Relay card

Project description

USAGE
=======

NOTE: The user running the script calling the relayboard code, must have permissions to use the serial port you are trying to communicate via.

You can use the module directly via other scripts, or via the webservice.



Sample Web Service
--------------------

.. code-block:: python
from paste import httpserver
from pyioboard import RelayBoard, ws

settings = {"serialport":'/dev/ttyACM0',
"gpios": [0, 1, 2, 3, 4, 5],
"relays": [0, 1, 2, 3],
}

with RelayBoard(settings['serialport']) as relayboard:
app = ws.create_ws(relayboard, settings)
httpserver.serve(app, host='0.0.0.0', port=8080)

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

PyIOboard-0.0.12.tar.gz (2.6 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