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, ControlMode
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,
ControlMode,
MotorState,
)
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.1.tar.gz
(18.4 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.1.tar.gz.
File metadata
- Download URL: pylmscontroller-1.0.1.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.12 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ded6c440890bac9feb9cfaf93cd8c02f23bdc3b13f5a74c6751dac3c3d83d1fd
|
|
| MD5 |
6803a5019b449e4eb91623f8477dc826
|
|
| BLAKE2b-256 |
b3868ddc24dcac89d461e17f5d46834095bbcb5bd87ecc911da2879045003c26
|
File details
Details for the file pylmscontroller-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pylmscontroller-1.0.1-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.12 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8335eeb9faf89db39c3523a6834f3158b027d33c50bea8d32ae5ec53be72c4
|
|
| MD5 |
29ca6b8c5bd39eafe41d73e5f872a739
|
|
| BLAKE2b-256 |
1d23a12f00888e2bc26c6afd065ef30aeb6f7dcd6cf991391ae2113b70ae230f
|