Repository navigation
v0.2.0
v0.2.0 (2026-07-04)
Major refactor and stabilization release — type hints, dual Firmata backend, optional deps, sensor support.
Added
- Full type hints on all public APIs:
Board,Motor,Servo,VL53L0X,delay,millis, exceptions. Board.__repr__— shows serial port + motor count (pyserial mode only; graceful fallback for pyfirmata2).Board.has_active_board()— static check without raising.Servo.__repr__— three states:"Servo(not attached)","Servo(pin=X, angle=unknown)","Servo(pin=X, angle=Y)".- Dual Firmata backend —
set_mode("pyserial")/set_mode("pyfirmata2")global switch (must be called beforeBoard()). Built-in pyserial client removes hard dependency onpyfirmata2. - VL53L0X time-of-flight sensor —
VL53L0Xclass inmegawrapper.sensor, I2C-based, independent of Firmata/Board. - Optional dependency groups in
pyproject.toml:pip install -e '.[pyserial]'— built-in Firmata backendpip install -e '.[sensor]'— VL53L0X sensor
- New examples:
examples/pyserial_control.py— demonstrates pyserial backendexamples/vl53l0x_sensor.py— ToF distance readout
- PyPI publish workflow —
.github/workflows/publish.ymltriggers on GitHub release. - Tests expanded to 92 — new
test_sensor.py, pyserial-mode tests intest_board.py.
Changed
pyproject.toml:pyserialandadafruit-circuitpython-vl53l0xmoved from hard deps → optional extras. Onlypyfirmata2remains required.README.mdrewritten — wiki-centric, examples table with descriptions, concise API overview.AGENTS.mdrewritten — accurate test count, dependency structure, architecture traps, testing quirks..gitignore: 94 lines → 13 (only patterns matching this project).- Internal cleanup: inlined single-use imports, removed dead analog-write branch (pins >= 16 unused).
Removed
examples/servo_test.py(90% overlap withendless_sweep.py)examples/endless_servo_sweep.py(redundant withServo.sweep())requirements.txt(duplicatespyproject.toml)tests/__init__.py(empty file)
Notes
- Requires Python 3.8+, Arduino running StandardFirmata.
- Hard dependency:
pyfirmata2only. Optional:pyserial(backend),adafruit-circuitpython-vl53l0x(sensor). - Not yet on PyPI — install from source:
pip install -e .(add.[pyserial]/.[sensor]for extras).