Skip to content
ESP32 sketch using the M5Stack 8Servo unit over I2C

M5Stack 8Servo

Use the M5Stack 8Servo unit (based on STM32F030) with any ESP32 board for a compact 8-channel servo setup.

Hardware

  • ESP32 development board (or M5Stack core)
  • M5Stack 8Servo unit
  • Up to 8 servos
  • 5–6V power supply for the servo unit

Wiring

ConnectionESP32 Pin8Servo Unit
SDAGPIO 22 (default)SDA
SCLGPIO 23 (default)SCL
GNDGNDGND

Connect servos to the output channels on the 8Servo unit. Power the unit with 5–6V.

Libraries

No additional libraries required — the sketch communicates with the STM32F030 over I2C using direct register writes.

Configuration

  • Servo channels: 8 (IDs 1–8)
  • I2C address: default M5Stack 8Servo address
  • I2C pins are configurable in the sketch (default SDA=22, SCL=23)
  • Device name can be customized in the sketch

Source

servomote-esp32-m5-8servo on GitHub