9 Axis motion Shield : BNO055

Hello,

my question is simple: has anyone been able to operate this shield with a UNO rev3 please?

I only get values at 0. I tried a lot of examples provided, the program compiles and runs well but the values returned are always at 0: rotation angles, acceleration …

here is a sample code:

#include "NAxisMotion.h"        //Contains the bridge code between the API and the Arduino Environment
#include <Wire.h>

NAxisMotion mySensor;         //Object that for the sensor 
unsigned long lastStreamTime = 0;     //To store the last streamed time stamp
const int streamPeriod = 20;          //To stream at 50Hz without using additional timers (time period(ms) =1000/frequency(Hz))

void setup() //This code is executed once
{    
  //Peripheral Initialization
  Serial.begin(115200);           //Initialize the Serial Port to view information on the Serial Monitor
  I2C.begin();                    //Initialize I2C communication to the let the library communicate with the sensor.
  //Sensor Initialization
  mySensor.initSensor();          //The I2C Address can be changed here inside this function in the library
  mySensor.setOperationMode(OPERATION_MODE_NDOF);   //Can be configured to other operation modes as desired
  mySensor.setUpdateMode(MANUAL); //The default is AUTO. Changing to MANUAL requires calling the relevant update functions prior to calling the read functions
  //Setting to MANUAL requires fewer reads to the sensor  
}

void loop() //This code is looped forever
{
  if ((millis() - lastStreamTime) >= streamPeriod)
  {
    lastStreamTime = millis();    
    mySensor.updateEuler();        //Update the Euler data into the structure of the object
    mySensor.updateCalibStatus();  //Update the Calibration Status

    Serial.print("Time: ");
    Serial.print(lastStreamTime);
    Serial.print("ms ");

    Serial.print(" H: ");
    Serial.print(mySensor.readEulerHeading()); //Heading data
    Serial.print("deg ");

    Serial.print(" R: ");
    Serial.print(mySensor.readEulerRoll()); //Roll data
    Serial.print("deg");

    Serial.print(" P: ");
    Serial.print(mySensor.readEulerPitch()); //Pitch data
    Serial.print("deg ");
    
    Serial.print(" A: ");
    Serial.print(mySensor.readAccelCalibStatus());  //Accelerometer Calibration Status (0 - 3)
 
    Serial.print(" M: ");
    Serial.print(mySensor.readMagCalibStatus());    //Magnetometer Calibration Status (0 - 3)
 
    Serial.print(" G: ");
    Serial.print(mySensor.readGyroCalibStatus());   //Gyroscope Calibration Status (0 - 3)
 
    Serial.print(" S: ");
    Serial.print(mySensor.readSystemCalibStatus());   //System Calibration Status (0 - 3)

    Serial.println();
  }
}

And the result :

Time: 7736ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7756ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7776ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7796ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7816ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7836ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7856ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7876ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7896ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7916ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7936ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7956ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0
Time: 7976ms H: 0.00deg R: 0.00deg P: 0.00deg A: 0 M: 0 G: 0 S: 0

Precision: I did not do any particular wiring, I just connected the shield on the arduino.

Also, i used I2C scanner, and nothing is detected, it seems that shield not responding. What’s your opinion about that ?

Thanks for any answer

Thanks for posting your code correctly!

i used I2C scanner, and nothing is detected, it seems that shield not responding. What's your opinion about that ?

That means no I2C device is connected to the I2C bus. Since the BNO055 is an I2C device*, it is not connected, not configured properly or not working.

Post a link to the product page for the "shield".

*in principle, there are two data connection options: I2C or UART serial. Make sure the correct one is selected.

Thank you.

I juste have this link : https://store.arduino.cc/9-axis-motion-shield

And this one : https://ev3dev-lang-java.github.io/docs/support/fundamentals/sensors/arduino/arduino-9-axes-motion-shield-BNO055.html

How can i select the connexion data type I2C ?

I looked through the product page, and there seems to be no documentation at all for this product except a schematic diagram.

I would assume that it doesn't work and contact the seller for a remedy.

You are much better off buying a sensor like that from Pololu or Adafruit, companies that support their products with documentation. A bulky shield is in any case a poor choice for a motion sensor, as it is inconvenient for use in a robot.

Some files from arduino.org are still on github.

https://github.com/arduino-org/arduino-library-nine-axes-motion

jremington: A bulky shield is in any case a poor choice for a motion sensor, as it is inconvenient for use in a robot.

... and moreover needs an Uno to plug it on top of.

Hello,

thank you all @gbafamily : this the files i use.

@jremington & meltDown : yes next time i will probably go to adafruit. For the time, i'm in touch with store support, they must send me technical instructions and code to test.

to be continued… i will inform you of the result

David

Hi there,

my problem has been solved by arduino store support, thanks to them.

The pb was i didn't use the right révision of NaxisMotion and/or BNO055 libraries.

The only one i found was on Github but it's not the right version.

The support sent me a direct link to a ZIP file. Here is the link, but i think it's temporary link.

https://arduino.zendesk.com/attachments/token/p1ZTvzQ5TvSIvGOHhImyhCPey/?name=BigCompilationExample.zip

Thank you all !

David.