Hello,
I'm trying to get BNO055 working together with Arduino Micro, and I'm having trouble...
This is how I have it connected.
This is the code I have.
#include <Wire.h>//for BNO055
#include <Adafruit_Sensor.h>//for BNO055
#include <Adafruit_BNO055.h>//for BNO055
#include <utility/imumaths.h>//for BNO055
Adafruit_BNO055 bno = Adafruit_BNO055(55);//for BNO055
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while (!Serial);//workaround required for Arduino Micro
//Serial.println("Orientation Sensor Test");
//Serial.println("");
/* Initialise the sensor */
if (!bno.begin())
{
// There was a problem detecting the BNO055 ... check your connections
Serial.print("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!");
while (1);
}
delay(1000);
bno.setExtCrystalUse(true);
}
void loop() {
// put your main code here, to run repeatedly:
/*BNO055 code: Get a new sensor event */
sensors_event_t event;
bno.getEvent(&event);
Serial.print("X: ");
Serial.print(event.orientation.x, 4);
Serial.print("\tY: ");
Serial.print(event.orientation.y, 4);
Serial.print("\tZ: ");
Serial.print(event.orientation.z, 4);
Serial.println("");
}
I get the following error message:
"Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!"
When I connected 5V with Vin instead, I didn't get the error message but still no values are being read from the serial monitor.
I did a search online, and there was someone advising to use this scanner.
I've tried with 3 different Arduino Micros but it wasn't detecting anything, and I kept on getting error message "No I2C devices found."
Any guesses I'm doing wrong here...???
Thank you for reading this.