

The BNO055 is a 9-axis absolute orientation sensor that integrates a 3-axis accelerometer, a 3-axis gyroscope, and a 3-axis magnetometer into a single package. Unlike traditional sensors, the BNO055 features an onboard microcontroller that fuses raw sensor data to provide accurate orientation information in the form of Euler angles (pitch, roll, yaw) or quaternions. This eliminates the need for complex sensor fusion algorithms on the host microcontroller.








| Parameter | Value |
|---|---|
| Operating Voltage | 2.4V to 3.6V |
| Logic Level Compatibility | 3.3V (5V tolerant with level shifters) |
| Communication Interfaces | I²C, UART, SPI |
| Power Consumption | 12 mA (typical in normal mode) |
| Operating Temperature | -40°C to +85°C |
| Sensor Fusion Output | Euler angles, quaternions, linear acceleration, gravity |
| Pin Name | Pin Number | Description |
|---|---|---|
| VIN | 1 | Power supply input (3.3V or 5V) |
| GND | 2 | Ground |
| SDA | 3 | I²C data line |
| SCL | 4 | I²C clock line |
| PS0 | 5 | Protocol selection pin (I²C/SPI) |
| PS1 | 6 | Protocol selection pin (I²C/SPI) |
| RST | 7 | Reset pin (active low) |
| INT | 8 | Interrupt output |
| TX | 9 | UART transmit line |
| RX | 10 | UART receive line |
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
// Create an instance of the BNO055 sensor
Adafruit_BNO055 bno = Adafruit_BNO055(55);
void setup() {
Serial.begin(9600); // Initialize serial communication
while (!Serial) {
delay(10); // Wait for the serial port to be ready
}
// Initialize the BNO055 sensor
if (!bno.begin()) {
Serial.println("BNO055 not detected. Check connections.");
while (1); // Halt execution if the sensor is not found
}
bno.setExtCrystalUse(true); // Use external crystal for better accuracy
Serial.println("BNO055 initialized successfully.");
}
void loop() {
// Get orientation data (Euler angles)
sensors_event_t event;
bno.getEvent(&event);
// Print pitch, roll, and yaw to the serial monitor
Serial.print("Pitch: ");
Serial.print(event.orientation.x);
Serial.print(" Roll: ");
Serial.print(event.orientation.y);
Serial.print(" Yaw: ");
Serial.println(event.orientation.z);
delay(100); // Delay to avoid flooding the serial monitor
}
Sensor Not Detected:
Incorrect Orientation Data:
No Data Output:
By following this documentation, you should be able to successfully integrate and use the BNO055 sensor in your projects.