Python library for Alphanov's LMS Controller
Project description
PyLMSController
Python library for ALPhANOV's LMS controller.
Installation
The library can be installed using pip:
pip install pylmscontroller
Requirements
This library requires the following packages:
- pyserial
Usage example
An example script is available in this repo.
List of available properties
from pylmscontroller import (
LMSController,
ControlMode,
MotorState,
)
c = LMSController("/dev/ttyUSB0")
print("Version: ", c.version)
print("LED Control Mode:", c.led_control)
print("LED is active:", c.led_activation)
print("LED Current (mA):", c.led_current)
print("Motors Control Mode", c.motors_control_mode)
print("Motor 1 Position:", c.motor_1_position)
print("Motor 2 Position:", c.motor_2_position)
print("Motor 3 Position:", c.motor_3_position)
LED Control
from pylmscontroller import LMSController
c = LMSController('/dev/ttyUSB0')
print("Setting LED active, current 40 mA.")
c.led_control = ControlMode.SOFTWARE
c.led_activation = True
c.led_current = 40.0
c.apply()
Motor Control
from pylmscontroller import LMSController
c = LMSController('/dev/ttyUSB0')
print("Setting Motors' position to IN/OUT/OUT.")
c.motors_control_mode = ControlMode.SOFTWARE
c.motor_1_position = MotorState.SLIDE_IN
c.motor_2_position = MotorState.SLIDE_OUT
c.motor_3_position = MotorState.SLIDE_OUT
c.apply()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pylmscontroller-1.0.0.tar.gz
(17.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylmscontroller-1.0.0.tar.gz.
File metadata
- Download URL: pylmscontroller-1.0.0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.1 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b83e051002e20b7a721a7b9f22c1db4c998b2671b35e3fc97446d525a64eda9
|
|
| MD5 |
87b94cc64b7a7730ad4485fb8a6933cb
|
|
| BLAKE2b-256 |
04fd54470b78cfa121d8a12f80e1151fb58359b3f166b9c352181cf7a18448f5
|
File details
Details for the file pylmscontroller-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pylmscontroller-1.0.0-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.1 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
995372c3ff9c8e7dc13db35d4f48baac9727deed89fa074c313549b34c7c1947
|
|
| MD5 |
25e7aa1bf17ca5d97cc27fb8b4b09781
|
|
| BLAKE2b-256 |
887162a7b428d5dbcc21e0ebeb7acda931c7bdc97a8dc2cde1d4536117002ea8
|