The Adafruit BNO055 STEMMA QT is a sophisticated sensor module that integrates three key sensors: an accelerometer, a gyroscope, and a magnetometer. This 9-DOF (degree of freedom) sensor is capable of providing precise orientation and motion tracking, making it an ideal choice for a wide range of applications, including robotics, navigation, human-machine interface, and gaming. Its ease of use and advanced features are well-suited for hobbyists, educators, and professionals alike.
Pin Number | Name | Description |
---|---|---|
1 | VIN | Power supply (3.3V to 5V) |
2 | GND | Ground connection |
3 | SCL | I2C clock line |
4 | SDA | I2C data line |
5 | PS0 | Protocol select (pull to GND for I2C) |
6 | PS1 | Not connected (NC) |
7 | RST | Reset input (active low) |
8 | INT | Interrupt output (active low) |
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
// Check the I2C address in the datasheet and update if necessary
#define BNO055_ADDRESS (0x28)
Adafruit_BNO055 bno = Adafruit_BNO055(55, BNO055_ADDRESS);
void setup() {
Serial.begin(9600);
if (!bno.begin()) {
// There was a problem detecting the BNO055, check connections
Serial.println("No BNO055 detected. Check wiring!");
while (1);
}
delay(1000);
bno.setExtCrystalUse(true);
}
void loop() {
// Get a new sensor event
sensors_event_t event;
bno.getEvent(&event);
// Display the orientation data
Serial.print("Orientation: ");
Serial.print("X: ");
Serial.print(event.orientation.x, 4);
Serial.print(" Y: ");
Serial.print(event.orientation.y, 4);
Serial.print(" Z: ");
Serial.print(event.orientation.z, 4);
Serial.println("");
delay(100); // Adjust to the desired output data rate
}
Q: Can the BNO055 be used with a 5V microcontroller like the Arduino UNO? A: Yes, the BNO055 STEMMA QT can be interfaced with a 5V microcontroller as it is 5V tolerant on the I2C pins.
Q: How do I calibrate the BNO055? A: Calibration involves moving the sensor in specific patterns. Adafruit provides a calibration guide and example code to assist with this process.
Q: What is the purpose of the INT pin? A: The INT pin can be used to receive interrupt signals from the BNO055, such as when new sensor data is available or when certain motion thresholds are exceeded.
Q: How can I change the output data rate? A: The output data rate can be configured using the BNO055's internal registers. Adafruit's BNO055 library provides functions to adjust these settings easily.
For further assistance, consult the Adafruit BNO055 STEMMA QT datasheet and the Adafruit support forums.