Context
PR #171 (feat(bq27441): Add driver for the on-board Li-Po fuel gauge.) intentionally does NOT wire the new driver into src/main.cpp. PR #172 (mcp23009e) is open in parallel and would touch the same file, so doing the integration inside either feature PR turns the second merge into a conflict — sequencing it after both drivers land is cheaper.
What to do
Edit src/main.cpp after PR #171 is merged to add the BQ27441 alongside the existing on-board drivers:
#include <BQ27441.h> next to the other driver headers.
- Instantiate on the internal bus:
BQ27441 bq27441(internalI2C);
- Add a probe section in
setup() matching the style of the existing drivers:
// --- BQ27441 (Li-Po fuel gauge) ---
if (bq27441.begin()) {
Serial.print("BQ27441 detected, DEVICE_ID = 0x");
Serial.println(bq27441.deviceId(), HEX);
Serial.print("BQ27441 first read: V = ");
Serial.print(bq27441.voltageMv());
Serial.print(" mV, SOC = ");
Serial.print(bq27441.stateOfCharge());
Serial.println(" %");
} else {
Serial.println("BQ27441 not detected");
}
- The STeaMi variant header does not expose a GPOUT wake pin for the gauge, so leave the constructor default (
gpout_pin = -1). If a future board revision wires it, pass it as the 4th constructor argument and begin() will pulse the wake sequence automatically.
Acceptance
Why this is a follow-up
Doing this inside #171 would conflict with #172, which also extends src/main.cpp. Sequencing the smoke-test edit after both feature PRs merge means whichever feature lands second only rebases its own diff — not also a src/main.cpp integration edit.
Context
PR #171 (
feat(bq27441): Add driver for the on-board Li-Po fuel gauge.) intentionally does NOT wire the new driver intosrc/main.cpp. PR #172 (mcp23009e) is open in parallel and would touch the same file, so doing the integration inside either feature PR turns the second merge into a conflict — sequencing it after both drivers land is cheaper.What to do
Edit
src/main.cppafter PR #171 is merged to add the BQ27441 alongside the existing on-board drivers:#include <BQ27441.h>next to the other driver headers.BQ27441 bq27441(internalI2C);setup()matching the style of the existing drivers:gpout_pin = -1). If a future board revision wires it, pass it as the 4th constructor argument andbegin()will pulse the wake sequence automatically.Acceptance
make build(steami env) green.BQ27441 detectedwith a plausible voltage (3000–4300 mV) and SOC (0–100 %) on a charged board.Why this is a follow-up
Doing this inside #171 would conflict with #172, which also extends
src/main.cpp. Sequencing the smoke-test edit after both feature PRs merge means whichever feature lands second only rebases its own diff — not also asrc/main.cppintegration edit.