Problem reading Data out of the BMI055 Acceleration and Gyroscope Sensor

Hello all,
I am trying to get all Data out of the BMI055 via I2C to work with it, but i cant realy figure out how this works. Before i worked with Datasheets that were better for understanding than the one for the BMI055 in my opinion. If someone could give an Code example how to read out for example the acceleration on x-Axis or something else I think that would help alot.
Right now we only get the Value -1 so either I didnt connect it right or my code is crap, which i think is the problem.
Thanks for reading!

The simplest test of basic I2C communications and proper wiring is to run the I2C address scanner, and check if it finds the device at the correct address. Then move on from there.

That is a 3.3V sensor.
If you are using a 5V Arduino board, how did you connect it ?

Thanks for your awnsers!
The I2C Scanner doesnt work properly.. I think i did connect the board wrong ...
the line error = endTransmission(); in the code is where it stops working in the first iteration of the for loop. When i disconnect the SDA and SCL wires it runs threw but finds nothing. In the picture (couldnt upload a normal reply could only quck reply and so couldnt add a photo) you can see how I connected the BMI055 Shuttleboard with the Arduino Uno. the Sheet for the Shuttleboard is
I also tried to connect it with the 3.3V Powersupply from the Arduino board but the result was the same. Hope you can help me :slight_smile:

If you have powered the Shuttleboard with 5V, then the sensor chip might be damaged.
You must use the 3.3V from the Arduino board.

When the i2c_scanner stops at endTransmission(), that means that the hardware I2C bus is broken. For example when SDA and SCL are shortcut to each other or when one of them is connected to GND.

Thanks for the large and sharp photo of your wiring :slight_smile:
I'm looking at the original photo, and I think I see that the circuit board has the pins connected with a copper trace where you have SDA and SCL connected.

The documentation of the Shuttleboard is not very clear. The picture on the right is what the pins are. You have somehow flipped that ? I think you should not flip it.
In the pdf file, pin numbers 10,11,12,13 are all connected and should be GND.
Now check your own Shuttleboard, and you see that 10,11,12,13 are connected, but there you have SDA and SCL.

Here is the power at pin 1. You should also have the 3V3 at pin 1.

Thumbs down for Bosch who makes great sensors, but doesn't print pin numbers on their Shuttleboard and have bad documentation.

Thank you so much!
That awnser helped alot. I reconnected the Sensor as you can see in the picture FOTOS-HOCHLADEN.NET now i get the respond :I2C device found at address 0x19 ! I2C device found at address 0x69 !
But I still dont realy know how to get the Data from the BMI055 now :confused:
It would be nice if someone could give me an example of the Wire instructions with the right registers to get data for any acceleration or something. I should be able to convert that to my needed accelerations and angles at least.

This is the BMI055 :
There is a link to github code, but that is not for the Arduino.

Perhaps this code for the BMA222 will help ? : Energia/hardware/cc3200/libraries/BMA222 at master · energia/Energia · GitHub

I managed to read the rotation of the BMI055 properly. At an angle of round about 45° it gives the value 32 (I gues the max angle is 255 =360) but the thing i dont get is that in the Datasheet on page 126 its said that i need to use registers 0x68/0x69 for the Data read out of the gyroscope:

The default I²C address of the accelerometerdevice is 0011000b (0x18)and of the gyro device is 1101000b (0x68). It is used if the SDO (1and 2) pin is pulled to ́GND ́. The alternative accel address 0011001b (0x19) and/orthe alternative gyro address 1101001b (0x69)is selected by pulling the SDO (1and/or2) pin to ́VDDIO ́.

But this is how my code looks like:


  Wire.requestFrom(i2cAddr, (uint8_t) 1);
  if (Wire.available()) {

So i read out of register 0x19 but get the proper Value for the Gyro ... Now i dont realy know how to handle this and how to read out the acceleration..
Anyone here who got an awnser for me? :confused:

At an angle of round about 45° it gives the value 32 (I gues the max angle is 255 =360)

No. The gyroscope does not measure angles, it measures the rate of rotation (degrees per second).

You really need to spend some time learning how I2C works. You need both a device address and a register address to get the data you want. There are lots of tutorials on the web to help.

Yaeh i got the register address. in the code it has the name reg (i copied it out of my code and forgot to insert the number) the register address is 0x03. But when i outprint the data of the given code it stays at 32 as long as i hold it in a 45° angle and as soon as i change the angle the data changes, too.