Repository navigation
Releases: BuildingBlockRobotics/DigitalExpander
Release list
Firmware 1.1.1
Firmware for the BBR Digital Expander. Update if your robot sees I2C dropouts, or the FTC driver logs expander REBOOTED.
What to download
bbr-digital-expander-1.1.1.uf2 — the firmware image. A UF2 is a drag-and-drop format: the board appears as a USB drive called RPI-RP2 and you copy the file onto it. Nothing to install.
Full instructions: Updating the firmware
sha256 68b5d5ae35feba85dff8d5820b5afdf10b2b6c920ed15476f03ffe08e2deab9a
What changed since 1.0.0
Robustness on a noisy bus. Found in robot testing, with motor noise getting onto the I2C cable:
- No more hangs. Bus noise could make the board freeze for half a second and restart, holding the I2C clock low while it did, which the Hub reports as a stuck bus. Fixed at the cause: the two processor cores could both update an internal counter at the same instant and leave it in a state the I2C handler waited on forever.
- Recovers from noise in about 1 ms. When a noise spike puts the board out of step with the Hub, it now lets go of the bus within about a millisecond, instead of after 50 ms (often twice).
- No lost read after a pause. The first read after the Hub had been quiet could be mistaken for a stalled transfer and reset. No longer.
Checksums and diagnostics (protocol 1.2):
- Encoder and sensor telemetry carries a CRC like the pose already did. The FTC driver checks it, so a reading damaged on the wire is re-read instead of reaching your code looking real.
- The board reports why it last reset (power-on, watchdog, software) and how often its I2C link has been disturbed. In the FTC driver:
readDiagnostics(), with reboots logged automatically. - Encoder velocity divides by the window it actually measured, not the nominal one (it read about 4% fast with the default window).
Protocol 1.2 is additive: new registers in previously reserved space, nothing moved. Drivers written for 1.1 keep working. The telemetry checksum and diagnostics are used by the FTC driver today; the Arduino and Python drivers still check the pose only.
Your configuration survives the update
Taught colours, trigger configuration, encoder directions, localizer parameters and PWM calibration are stored in a flash region this image does not reach. Flashing it does not erase them.
Compatible drivers
| Platform | Driver |
|---|---|
| FTC (Java) | DigitalExpander — this repository |
| Arduino (C++) | DigitalExpander-Arduino |
| Raspberry Pi (Python) | DigitalExpander-Python |
All three speak protocol 1.x and refuse to start against a firmware whose protocol major they do not know, rather than reading a register map that may have moved underneath them.
The current FTC and Python drivers also no longer end your program if the robot is bumped during gyro calibration: calibrateGyro() and resetLocalizerAndCalibrateImu() return false and keep the previous calibration.
Firmware 1.0.0
First released firmware for the BBR Digital Expander.
What to download
bbr-digital-expander-1.0.0.uf2 — the firmware image. A UF2 is a drag-and-drop format: the board appears as a USB drive called RPI-RP2 and you copy the file onto it. Nothing to install.
Full instructions, including how to get the board into bootloader mode over I2C without touching it: Updating the firmware
sha256 3c0f37291b0c356eed66aff111e9a204077dc14e6822a2d9425c2c24c53438ca
What this firmware is
Protocol contract 1.1 — the register map every driver here is written against. The board reports 1.0.0 in its FW_VERSION registers, so what a device-info readout prints matches this release.
- Four quadrature encoder channels, individually switchable to pulse-width absolute encoders, with velocity computed on the board
- Four sensor ports, colour or distance in any mix, with type detection and on-board colour classification into seven taught slots
- Four digital outputs driven by the board itself from a taught colour, a distance window, an encoder threshold or a heading — level, latched or pulse
- IMU heading and a fused dead-wheel odometry localizer, pose CRC-checked on the wire
- Configuration persisted to flash, with wear levelling across two slots
Your configuration survives the update
Taught colours, trigger configuration, encoder directions, localizer parameters and PWM calibration are stored in a flash region this image does not reach. Flashing it does not erase them.
Compatible drivers
| Platform | Driver |
|---|---|
| FTC (Java) | DigitalExpander — this repository |
| Arduino (C++) | DigitalExpander-Arduino |
| Raspberry Pi (Python) | DigitalExpander-Python |
All three speak protocol 1.x and refuse to start against a firmware whose protocol major they do not know, rather than reading a register map that may have moved underneath them.