You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains Python drivers and example scripts to control ST3215 Series Smart Servo (Waveshare) using ESP32 Servo Driver Expansion Board (Waveshare) over WiFi. It supports single servo control, multi-servo sequences, and matrix-style control for projects such as conveyor sorting or robotics grids.
📦 Files Included
Drivers
File
Description
esp32_servo_driver.py
Core HTTP driver for controlling a single ESP32-connected servo. Supports commands, status read, retries, and parsing.
esp32_servo_driver_matrix.py
Matrix servo driver: safely activates column and row servos sequentially.
esp32_servo_driver_matrix_queue.py
Matrix servo driver with a queue system for multiple pieces. Executes column → row moves safely in order.
Test / Example Scripts
File
Description
test_driver.py
Basic test of a single servo: search, move, read status.
test_4_servos.py
Sequentially moves 4 servos connected to the ESP32.
test_4_servos_parallel.py
Round-robin style move sequence for 4 servos to simulate faster multi-servo operations.
test_matrix.py
Example of activating column and row servos using esp32_servo_driver_matrix.py.
test_matrix_queue.py
Example of enqueuing multiple pieces and processing them sequentially with safe servo commands.
⚡ Prerequisites
Python 3.8+
requests library (pip install requests)
ESP32 running the compatible MY-series servo firmware
ESP32 IP address on the local WiFi network (default example: 192.168.4.1)
fromesp32_servo_driver_matriximportMatrixServoDriverdriver=MatrixServoDriver("192.168.4.1")
# Activate a column servo then a row servodriver.activate_column(1)
driver.activate_row(2)
driver.activate_column(3)
driver.activate_row(1)