openbricks documentation

openbricks is a Pybricks-style MicroPython firmware for open hardware — commodity MCUs, commodity motors, commodity sensors.

Like Pybricks, openbricks is a firmware you flash to an MCU, not a library you pip install on top of stock MicroPython. The firmware owns the runtime: the 1 kHz motor scheduler, trajectory planner, state observer, and drivebase controller run as native C code inside the image, and the three-layer Python API (drivers → interfaces → robotics) is what import openbricks gives you out of the box.

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)   # mm
db.turn(90)        # degrees
  • Firmware images: ESP32-S3 (primary) and classic ESP32, prebuilt on every release.

  • Host tooling: pipx install openbricks gets you the openbricks CLI (flash / run / upload / stop / log over BLE) and, with the [sim] extra, a MuJoCo-backed simulator.

  • Source: github.com/1e0ng/openbricks, MIT licensed.