Skip to main content

Library to control 8inputs Automation Card

Project description

8inputs-rpi

lib8inputs

This is the python library to control the Four Relays four Inputs 8-Layer Stackable Card for Raspberry Pi.

Install

sudo pip install SM8inputs

Usage

Now you can import the megaio library and use its functions. To test, read relays status from the board with stack level 0:

~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lib8inputs
>>> lib8inputs.get_opto_all(0)
0
>>>

Functions

get_opto(stack, channel)

Get one input state.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

channel - opto input channel number (id) [1..8]

return 0 == opto off; 1 - opto on

get_opto_all(stack)

Return the state of all opto inputs.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

return - [0..255] 8inputs-rpi

lib8inputs

This is the python library to control the 4-RELAYS Heavy Duty Stackable Card for Raspberry Pi.

Install

sudo pip install SM8inputs

Usage

Now you can import the megaio library and use its functions. To test, read relays status from the board with stack level 0:

~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lib8inputs
>>> lib8inputs.get_opto_all(0)
0
>>>

Functions

get_opto(stack, channel)

Get one input state.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

channel - opto input channel number (id) [1..8]

return 0 == opto off; 1 - opto on

get_opto_all(stack)

Return the state of all opto inputs.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

return - [0..255]

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

sm8inputs-1.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sm8inputs-1.0.2-py2.py3-none-any.whl (3.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sm8inputs-1.0.2.tar.gz.

File metadata

  • Download URL: sm8inputs-1.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for sm8inputs-1.0.2.tar.gz
Algorithm Hash digest
SHA256 69e97369c67d49d44eac930b261815920d63aafccb644e35ddbc411d241d2a1f
MD5 da1429182978227a321563e9ecf876e7
BLAKE2b-256 c9bb758e770ab8aac335d7658acffcb307a8e717482c2b348c3be7dc01da8ca6

See more details on using hashes here.

File details

Details for the file sm8inputs-1.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: sm8inputs-1.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for sm8inputs-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0bfb6998367e6dba103630814884c442508efa9cde47151adf9f1439fa1b24b9
MD5 16f8fb082022478a561b68d7b79b0294
BLAKE2b-256 0f6209cc87c50706d43f2c8ed6204a33ab17336e3e40b1854190f408a2155e18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page