Hi,
I use a Bosch BMI160 sensor to measure the three-axis acceleration and orientation. This sensor is connected to a developer board. I read a total of 12 registers and expect 12 values each time (one LSB and MSB value per axis).
Here is how it looks like: DevBoard with Sensor
Wire.beginTransmission(AddrBMI160);
Wire.write(12);
Wire.endTransmission(true);
Wire.requestFrom(AddrBMI160, 12, true);
for (int i = 0; i < 12; i++) {
Serial.print(Wire.read());
if (i < 11) {
Serial.print(",");
}
}
Serial.println();
delay(300);
My output looks like this:
"202,255,1,0,228,255,213,2,87,7,213,62"
"196,255,7,0,243,255,207,2,84,7,201,62"
//and so on...
If I put the developer board in my hand and close my hand for a short moment, then the "-1" is suddenly transferred 12 times and then the data transfer stops. However, the connection to the developer board is still available (the corresponding LED lights up). It happens every time I put my hand around the sensor as if my hand were an obstacle. How can it be that this happens? What might this -1 be?
"202,255,1,0,228,255,213,2,87,7,213,62"
"196,255,7,0,243,255,207,2,84,7,201,62"
"-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
// then data transfer stopps