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.
- 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
Install via pip:
pip install python-st3215from 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()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.
The library is fully documented through docstrings. Hover over classes and functions in your editor to see type hints, parameter descriptions, and usage notes.
| Brand | SKU | Product |
|---|---|---|
| Waveshare | 22414 | ST3215 Series Serial Bus Servo |
| Waveshare | 25514 | Bus Servo Adapter (A) |
The complete memory map is documented in MEMORY_TABLE.md.
This project is licensed under the GPL-3.0-or-later license.
See the LICENSE file for full details.
If this library has been useful to you, consider supporting its development: https://ko-fi.com/alessiodam