/pymodi

Easy😆 and fast💨 MODI Python API package.

Primary LanguagePythonMIT LicenseMIT

pymodi


pyversion distribution documentation coverage maintainability license
image image Documentation Status Coverage Status Maintainability

Easy😆 and fast💨 MODI Python API package.

Features

  • Connect to the MODI network module and control input & output modules.
  • List serial ports of MODI network modules.
  • Turn on or off the PnP mode of MODI modules.
  • Get the position information of each modules.

Build Status

master develop
image image

System Support

System 3.6 3.7 3.8
Linux Build Status Build Status Build Status
Mac OS Build Status Build Status Build Status
Windows Build Status Build Status Build Status

Contribution Guidelines

We appreciate all contributions. If you are planning to report bugs, please do so at https://github.com/LUXROBO/pyMODI/issues. Feel free to fork our repository to your local environment, and please send us feedback by filing an issue.

If you want to contribute to pymodi, be sure to review the contribution guidelines. This project adheres to pymodi's code of conduct. By participating, you are expected to uphold this code.

Contributor Covenant

Quickstart

Install the latest pyMODI if you haven't installed it yet:

pip install -U pymodi --user

Import [modi]{.title-ref} package and create [MODI]{.title-ref} instance:

import modi
bundle = modi.MODI(nb_modules=1)

List connected modules:

bundle.modules

List connected LED modules and pick the first one:

bundle.leds # List.
bundle.leds[0] # Pick.

Let's blink the LED's light 5 times:

import time

led = bundle.leds[0]

for _ in range(5):
    led.set_on()
    time.sleep(1)
    led.set_off()
    time.sleep(1)