pyversion | distribution | documentation | coverage | maintainability | license |
---|---|---|---|---|---|
Easy😆 and fast💨 MODI Python API package.
- Free software: MIT license
- Documentation: https://pymodi.readthedocs.io.
- 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.
master | develop |
---|---|
System | 3.6 | 3.7 | 3.8 |
---|---|---|---|
Linux | |||
Mac OS | |||
Windows |
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.
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)