BB15 is the board-centric Arduino library for BrainBoard15.
The public API is centered on the physical BB15 board:
BB15handles board bring-up, reset routing, expander access, flash access, and transport state.BB15Modeldescribes a serialized Akida model and where it lives.BB15Runnerloads models and runs inference.
The constructor requires a BB15Pinout, so host-board wiring is always
explicit:
#include <BB15.h>
BB15Pinout pinout = BB15Pinout::niclaSenseMeDefaults();
BB15Config config = BB15Config::defaults();
void setup() {
static BB15 bb15(pinout, config);
}Construct BB15 once setup() is running. Do not create it as a global
object, because the constructor touches board hardware state.
The standard pinouts define separate controls for the complete BB15 board and the Akida device:
powerDown()holds the full BB15 board reset through the host reset pin.powerUp()releases the full BB15 board reset.holdAkidaInReset()andreleaseAkidaReset()control only the Akida reset through expander P4.sleep()andwake()control Akida sleep through expander P3.
After powerUp() or wake(), call begin() and BB15Runner::begin() before
running inference.
The current target hosts are:
- Arduino Nicla Sense ME
- Arduino Nicla Vision
Classic AVR boards are not a target for this library.
The example set is intentionally small and board-specific:
examples/bb15_model_flasher_nicla_senseFlashes one exported Akida model into BB15 external flash from a Nicla Sense ME host and verifies that the runtime can load it back.examples/bb15_dummy_inference_nicla_senseLoads the flashed model and runs interrupt-driven synthetic inference on a Nicla Sense ME host.examples/bb15_model_flasher_nicla_visionFlashes one exported Akida model into BB15 external flash from a Nicla Vision host and verifies that the runtime can load it back.examples/bb15_dummy_inference_nicla_visionLoads the flashed model and runs interrupt-driven synthetic inference on a Nicla Vision host.examples/bb15_nicla_vision_human_detectionCaptures live Nicla Vision camera frames, preprocesses them for the bundled VWW person-detection model, runs interrupt-completed inference, and streams a grayscale preview plus results over USB CDC.
All sketches are heavily commented and meant to be modified by users.
- Export your model into the example asset files:
program.hprogram.cppmodel_metadata.hmodel_metadata.cpp
- Pick the example pair that matches your host board.
- Upload the matching
bb15_model_flasher_*sketch. - Confirm the sketch reports a successful flash and verify pass.
- Upload the matching
bb15_dummy_inference_*sketch. - Confirm inference completes and prints scores.
The Vision flasher installs
NiclaV_VWW_PersonDet_EN_USBbottom_2026-06-14, a 96x96x3 Visual Wake Words
person-detection model. The matching live-camera workflow is:
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_vision --library . examples/bb15_model_flasher_nicla_vision
arduino-cli upload --fqbn arduino:mbed_nicla:nicla_vision --port /dev/ttyACM0 examples/bb15_model_flasher_nicla_vision
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_vision --library . examples/bb15_nicla_vision_human_detection
arduino-cli upload --fqbn arduino:mbed_nicla:nicla_vision --port /dev/ttyACM0 examples/bb15_nicla_vision_human_detection
python3 -m pip install -r tools/requirements.txt
python3 tools/bb15_nicla_vision_preview.py --port /dev/ttyACM0Upload the flasher first, confirm flash/verify/model-load success, then upload
the human-detection sketch. Replace /dev/ttyACM0 with the serial port assigned
by your operating system. The camera sketch never writes flash. It captures
RGB565 at 320x240, sends a grayscale USB preview, and converts each frame to
the VWW model's rotated 96x96x3 input locally. The desktop tool requires
Python 3.7 or later, pyserial, and the system Tk package used by tkinter.
The current validated compile commands are:
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_sense --library . examples/bb15_model_flasher_nicla_sense
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_sense --library . examples/bb15_dummy_inference_nicla_sense
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_vision --library . examples/bb15_model_flasher_nicla_vision
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_vision --library . examples/bb15_dummy_inference_nicla_vision
arduino-cli compile --clean --fqbn arduino:mbed_nicla:nicla_vision --library . examples/bb15_nicla_vision_human_detectionRun these sequentially. Parallel arduino-cli compiles can race in the shared
Arduino cache and produce misleading failures.
Validation status as of August 21, 2026:
- the four existing primary examples compile successfully in this repository
- the Nicla Sense ME flasher and dummy inference examples compile for
arduino:mbed_nicla:nicla_sense - the Nicla Vision flasher and dummy inference examples compile for
arduino:mbed_nicla:nicla_vision - the Nicla Vision flasher has been hardware-validated in this workspace and now completes flash, verify, and model load successfully
- the human-detection camera path has been hardware-validated on Nicla Vision:
VWW model load, camera capture, preprocessing, interrupt-completed inference,
and a complete
320x240USB frame-result packet all succeeded
src/Public library code and internal runtime support owned by this package.examples/The supported user-facing sketches.