Skip to main content

BHI385 Smart IMU - Getting started

Arduino library

To install the Arduino library, you can use the Arduino library manager or download it from the GitHub repository:

Soldered BHI385 IMU Arduino Library

Arduino library for the Bosch BHI385 Smart IMU: firmware upload, virtual sensor enable/disable, and FIFO-based data readout.

ℹ️

First time Arduino user? For a detailed tutorial on how to get started with Arduino, see this section of our docs:

Getting started with Arduino

A full, comprehensive tutorial on how to fully set up and upload code for the first time on an Arduino board, from scratch!


Getting the firmware binary

The BHI385 has no internal flash. The sensor firmware must be uploaded from your sketch on every power-on. The firmware binary is distributed by Bosch Sensortec as part of their SensorAPI package and is not bundled with this library due to licensing.

To get it:

  1. Download the BHI385 SensorAPI from Bosch Sensortec's GitHub.
  2. Inside the package, locate the firmware header file (e.g. BHI385_firmware.h or a .fw.h variant from the firmware/ folder).
  3. Copy that header file into your Arduino sketch folder alongside your .ino file.
  4. Include it in your sketch with #include "BHI385_firmware.h".
⚠️
Without the firmware header, loadFirmware() cannot be called and no virtual sensors will produce data. Make sure the file is in your sketch folder before uploading.

Connections

Below is an example connection diagram for NULA DeepSleep. These pins will be used in the examples throughout this documentation.

NULA DeepSleepBHI385 Breakout
QwiicQwiic