Skip to content

alessiodam/python-st3215

Repository files navigation

Python-ST3215

PyPI Version Python Versions License Downloads Issues

Python-ST3215 is a lightweight and intuitive Python library for communicating with ST3215 Smart Servos over a serial bus. It provides a high-level interface for reading and writing servo parameters, controlling motion, and working with the servo memory map.

Features

  • Simple API for controlling ST3215 servos
  • High-level wrapper for movement and parameter access
  • Helpful exceptions for robust applications
  • Fully typed and documented through docstrings
  • Tested against Waveshare ST3215 hardware

Installation

Install via pip:

pip install python-st3215

Quick Start

from python_st3215 import ST3215, ServoNotRespondingError

controller = ST3215("/dev/ttyUSB0")

try:
    servo = controller.wrap_servo(1)
    print("Current location:", servo.sram.read_current_location())
except ServoNotRespondingError:
    print("Servo not responding")
finally:
    controller.close()

Examples

A collection of example scripts is available in the examples/ directory. These cover tasks such as motion control, serial communication tests, reading/writing parameters, and more.

Documentation

The library is fully documented through docstrings. Hover over classes and functions in your editor to see type hints, parameter descriptions, and usage notes.

Hardware Compatibility

Brand SKU Product
Waveshare 22414 ST3215 Series Serial Bus Servo
Waveshare 25514 Bus Servo Adapter (A)

Memory Table

The complete memory map is documented in MEMORY_TABLE.md.

License

This project is licensed under the GPL-3.0-or-later license. See the LICENSE file for full details.

Supporting the Project

If this library has been useful to you, consider supporting its development: https://ko-fi.com/alessiodam

About

Python library for the ST3215 Servo

Resources

License

Stars

Watchers

Forks

Contributors

Languages