Skip to content

[andino_firmware] Add IMU HAL interface to decouple App from Adafruit BNO055 - #335

Open
jballoffet wants to merge 1 commit into
mainfrom
jballoffet/chore/add-imu-hal-interface
Open

[andino_firmware] Add IMU HAL interface to decouple App from Adafruit BNO055#335
jballoffet wants to merge 1 commit into
mainfrom
jballoffet/chore/add-imu-hal-interface

Conversation

@jballoffet

Copy link
Copy Markdown
Member

🎉 New feature

Summary

This PR adds Imu HAL interface (include/andino/hal/imu.h) along with ImuAdafruitBno055Arduino (include/andino/bsp/imu_adafruit_bno055_arduino.h / src/bsp/imu_adafruit_bno055_arduino.cpp), the concrete Arduino implementation backed by an Adafruit BNO055 sensor. The Adafruit_BNO055 instance is constructed internally as a file-scope static (g_bno055_imu), so the class is default-constructible and callers never need to know about the underlying sensor object.

Test it

docker compose -f docker/compose.yaml run --rm dev pio run -e uno
Container andino-firmware-dev-run-dc8331ddb036 Creating 
Container andino-firmware-dev-run-dc8331ddb036 Created 
Processing uno (board: uno; platform: atmelavr; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR (5.3.0) > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES: 
 - framework-arduino-avr @ 5.4.0 
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 8 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Wire @ 1.0
|-- SPI @ 1.0
|-- Adafruit BNO055 @ 1.6.4
|-- Adafruit BusIO @ 1.17.4
|-- Adafruit Unified Sensor @ 1.1.15
Building in release mode
Compiling .pio/build/uno/src/main.cpp.o
Linking .pio/build/uno/firmware.elf
Checking size .pio/build/uno/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=====     ]  52.4% (used 1073 bytes from 2048 bytes)
Flash: [=====     ]  52.3% (used 16880 bytes from 32256 bytes)
Building .pio/build/uno/firmware.hex
============================================================================================================= [SUCCESS] Took 0.44 seconds =============================================================================================================

Environment    Status    Duration
-------------  --------  ------------
uno            SUCCESS   00:00:00.439
============================================================================================================= 1 succeeded in 00:00:00.439 =============================================================================================================

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Javier Balloffet <javier.balloffet@gmail.com>
@jballoffet
jballoffet force-pushed the jballoffet/chore/add-imu-hal-interface branch from 10d9143 to 6f5805f Compare August 15, 2026 18:02
@jballoffet jballoffet changed the title Add IMU HAL interface to decouple App from Adafruit BNO055 [andino_firmware] Add IMU HAL interface to decouple App from Adafruit BNO055 Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 Backlog

Development

Successfully merging this pull request may close these issues.

1 participant