This repository contains all the drivers for the main components of the STeaMi board. These drivers are written for MicroPython and are designed to be used either in the construction of the official MicroPython firmware for the STeaMi board or independently for custom projects.
- Ready-to-use MicroPython drivers
- Consistent API design across all components
- Full mock + hardware test suite
- CI integration for reliability
| Component | Driver | I2C Address | Description |
|---|---|---|---|
| BQ27441-G1 | bq27441 |
0x55 |
Battery fuel gauge |
| DAPLink Bridge | daplink_bridge |
0x3B |
I2C bridge to STM32F103 + config zone |
| DAPLink Flash | daplink_flash |
— | Flash file operations via bridge |
| SSD1327 | ssd1327 |
— (SPI) | 128x128 greyscale OLED display |
| MCP23009E | mcp23009e |
0x20 |
8-bit I/O expander (D-PAD) |
| VL53L1X | vl53l1x |
0x29 |
Time-of-Flight distance sensor |
| APDS-9960 | apds9960 |
0x39 |
Proximity, gesture, color, light |
| HTS221 | hts221 |
0x5F |
Humidity + temperature |
| WSEN-HIDS | wsen-hids |
0x5F |
Humidity + temperature |
| WSEN-PADS | wsen-pads |
0x5D |
Pressure + temperature |
| ISM330DL | ism330dl |
0x6B |
6-axis IMU (accel + gyro) |
| LIS2MDL | lis2mdl |
0x1E |
3-axis magnetometer |
| IM34DT05 | im34dt05 (not yet implemented) |
— (PDM) | Digital microphone |
| BME280 | bme280 |
0x76 |
Pressure + humidity + temperature |
| GC9A01 | gc9a01 (not yet implemented) |
— (SPI) | Round color LCD display |
| STeaMi Config | steami_config |
— | Persistent board configuration |
Run a driver example on your STeaMi board without installing anything permanently.
- A STeaMi board running MicroPython
- A USB cable to connect the board to your computer
- Python installed on your computer
mpremote is the official MicroPython tool to interact with your board.
pip install mpremotePlug your STeaMi board via USB.
To verify that it is detected:
mpremote connect listYou should see a serial device (e.g. /dev/ttyUSB0 on Linux or COM3 on Windows).
You can run a driver example directly on the board without copying files:
mpremote mount lib/ism330dl run lib/ism330dl/examples/basic_read.pyThe Quick start section above shows how to run examples temporarily. The mount command makes the driver available without copying it to the board.
Install a driver permanently by copying it into the board’s /lib directory.
mpremote cp -r lib/<driver_folder>/<driver> :lib/Example:
mpremote cp -r lib/ssd1327/ssd1327 :lib/Once copied, the driver can be imported normally without mounting.
make setup # Install pip + npm dependencies and git hooksRun make help to see all available targets:
| Command | Description |
|---|---|
make lint |
Run ruff linter |
make lint-fix |
Auto-fix lint issues |
make test |
Run mock tests (no hardware) |
make test-mock |
Run mock tests |
make test-hardware |
Run all hardware tests (needs board) |
make test-board |
Board tests only (buttons, LEDs, buzzer) |
make test-sensors |
Sensor driver hardware tests |
make test-all |
All tests (mock + hardware) |
make test-examples |
Validate example files |
make test-<scenario> |
Test a specific scenario (e.g. make test-hts221) |
make ci |
Full CI pipeline (lint + tests + examples) |
make repl |
Open MicroPython REPL |
make mount |
Mount lib/ on the board |
make clean |
Remove caches |
make deepclean |
Remove everything including node_modules |
Per-scenario targets are generated automatically from tests/scenarios/*.yaml.
Git hooks are managed by husky and run automatically on commit:
- commit-msg — validates commit message format via commitlint
- pre-commit — branch name validation, content checks (conflict markers, TODO), ruff on staged
.pyfiles
Run the full mock test suite:
make testRun hardware tests (requires a STeaMi board on /dev/ttyACM0):
make test-hardwareRun tests for a specific driver:
make test-hts221See full details in tests/TESTING.md.
Contributions are welcome! Please follow the project guidelines.
See CONTRIBUTING.md
This project is licensed under the GPL v3 License. See the LICENSE file for more details.