openbricks is a MicroPython firmware you flash to a commodity ESP32 board. Wire up off-the-shelf servos and sensors, and drive robots with a clean Python API — motor control runs at 1 kHz in native C inside the firmware.
from openbricks.drivers.st3032 import ST3032Motor from openbricks.robotics import DriveBase left = ST3032Motor(servo_id=1, tx=14, rx=6) right = ST3032Motor(servo_id=2, tx=14, rx=6, invert=True) db = DriveBase(left, right, wheel_diameter_mm=56, axle_track_mm=114) db.straight(500) # millimetres db.turn(90) # degrees
Pybricks gives LEGO users a delightful Python API, but only on LEGO hubs with LEGO motors. openbricks takes the same shape — a custom MicroPython firmware with the robotics library baked into the runtime — and targets parts you can buy anywhere.
The motor scheduler, trapezoidal trajectory planner, state observer, and 2-DOF drivebase controller are compiled C inside the image, ticking at 1 kHz off a hardware timer. Python is for your program, not the hot path.
ESP32-S3 and classic ESP32 boards, Feetech serial-bus servos, DC gear motors with encoders, and I2C sensors from any electronics shop. No proprietary hubs, no vendor lock-in.
One CLI does it all: openbricks flash over USB, then run, upload, stop, and log over BLE — plus a MuJoCo-backed simulator so you can develop without a robot on the desk.
Full walkthrough in the installation guide.
pipx install 'openbricks[sim]'
CLI + simulator. Drop [sim] for flash/run/log only.
openbricks flash --name RobotA \ --port /dev/ttyUSB0 \ --firmware openbricks-esp32s3.bin
Prebuilt images for ESP32-S3 and ESP32 on every release.
openbricks run -n RobotA main.py
Pushed over BLE, output streamed back live. Or try it first in the sim: openbricks sim run main.py
Every driver ships frozen into the firmware — import openbricks and go. New components just implement one of the abstract interfaces. Wiring notes in the hardware guide.
| Component | Type | Module |
|---|---|---|
| ST-3032 (Feetech STS3032) | Serial bus servo — recommended drive motor | drivers.st3032 |
| ST-3215 | Serial bus servo — arms / grippers | drivers.st3215 |
| JGB37-520 / MG370 | DC gear motors with quadrature encoders | drivers.jgb37_520, drivers.mg370 |
| L298N / TB6612FNG | H-bridge motor drivers | drivers.l298n, drivers.tb6612 |
| BNO055 | 9-DOF IMU with onboard fusion | drivers.bno055 |
| TCS34725 | RGB + clear color sensor | drivers.tcs34725 |
| HC-SR04 / VL53L0X / VL53L1X | Ultrasonic & laser distance sensors | drivers.hcsr04, drivers.vl53l0x, drivers.vl53l1x |
| TCA9548A | 8-channel I2C multiplexer | drivers.tca9548a |
| SSD1306 | OLED display | drivers.ssd1306 |