Skip to main content

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


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.2.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

pylmscontroller-1.0.2-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylmscontroller-1.0.2.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.13 Darwin/25.5.0

File hashes

Hashes for pylmscontroller-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9b99fb78c3adaba2d2d11026257055c2c573f855456c04d41d1f165ab7de6c6c
MD5 fc09fb865161e7e65675d59a1e013dac
BLAKE2b-256 7bb2226228acfcb74a0bc5b2135ba16c667e532c61515b4f87c395452a6a12de

See more details on using hashes here.

File details

Details for the file pylmscontroller-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pylmscontroller-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.13 Darwin/25.5.0

File hashes

Hashes for pylmscontroller-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ee9f41137dbbe086e3261e7907b7afad072d3627181db98ddb036b4737d1c3ed
MD5 654d8c6ba6fc15dba8513ec5257d72a4
BLAKE2b-256 9e917df07350b857d0bc9ad70533c1bbd1cff69ecb7802047bd7b06008822877

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