OpenRov IMU/Compass/Depth module using Arduino


I have been working only with Arduino Mega as a controller to use the OpenRov IMU/Compass/Depth sensor to be used for my vehicle. I have tried to use the Arduino interface code in the opensource that interferes with BNO055 IMU and other many libraries but I don’t get the data right (the data displayed are zeros at first for the first loops and then some unkonwn symbols display on the serial monitor) .
Is there a ready and a separate Arduino code for controlling the IMU?


Try this stand-alone library to working directly on the Arduino: If your getting weird characters over the serial port that usually implies your baud rate in the serial monitor does not match the baud rate set in the sketch.


Thanks for replying.
Yes, the baud rate was wrong and I have changed it. However, the link you put is for Adafruit BNO055 which is different from the OPENROV’s IMU/Depth sensor and it has a different address, therefore, it didn’t work as on the serial monitor it appeared “Ooops, no BNO055 detected … Check your wiring or I2C ADDR!”


It looks like you can #define ARDUINO_SAMD_ZERO and it will swap the address. Or in your sample code you can change the Adafruit_BNO055(55) to Adafruit_BNO055(55,BNO055_ADDRESS_B).


If you can’t get the Adafruit library to work, you can also use our standalone BNO055 library in one of our development branches under /libraries/BNO055:


#include <BNO055.h>

CBNO055Driver bno( BNO055_ADDRESS_A );
// or

// Here you can choose which Wire interface you want to use by passing a pointer to it
if( bno.Initialize( &Wire ) )
    // Success
    // Failure, handle accordingly


imu::Vector<3> euler;
bno.GetVector( bosch::VECTOR_EULER, euler );

float roll = -euler.y();
float pitch = euler.z();
float yaw = euler.x();    


Thank you so much, my IMU finally has worked. and it is ADDRESS_A not ADDRESS_B.


Thank you for your help but the Adafruit has worked for me now :smiley:

split this topic #8

A post was split to a new topic: How do you find the BNO055 based IMU