Go Down

Topic: Having trouble getting Arduino Micro + BNO055 working (Read 113 times) previous topic - next topic

togogo

Hello,


I'm trying to get BNO055 working together with Arduino Micro, and I'm having trouble...

This is how I have it connected.

https://ibb.co/kSLbm2Q
https://ibb.co/cwPhdmf
https://ibb.co/fp7xhFB

This is the code I have.

Code: [Select]

#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.


pylon

Quote
This is how I have it connected.

https://ibb.co/kSLbm2Q
https://ibb.co/cwPhdmf
https://ibb.co/fp7xhFB
First: no links to external sites for images! In a few months now images will be accessible anymore and people looking for help will have no clue what you posted. Additionally I don't want to have to define javascript allowance rules for such sites just to view pictures.

Post a wiring diagram. On these pictures the actual connectivity isn't visible. The diagram may be hand-drawn. Is it correct that you're using the board from Adafruit?

jremington

The Arduino Micro does not appear to have pullup resistors on the I2C lines.  Won't work without them.

togogo

@pylon

My apologies about the photos. I will not do this next time I post anything.

@jremington

Thank you for the advice.

I actually double checked the wiring, and it seems there was a mistake on my side. Now it's working perfectly fine without using the pullup resistors.

pylon

Quote
The Arduino Micro does not appear to have pullup resistors on the I2C lines.  Won't work without them.
With a short bus wiring it actually works using the internal pullups (which are activated by the Wire library).

Go Up