Hello, I want to ask that why am I getting wrong accelerometer values. I am calculation roll using the formula atan2(z,x) and getting degrees with minor error when sensor is in 3g configeration. When I configure it to 12g then the sensor gives wrong values from 0 degree to 5 degree because it gives values of x-axis in negative. When in 3g configeration, the sensor goes like this: 0, 1, 2, 1, 3, 2, 4, 3, 5...... The sensor drops a degree and then increment the angle. There is error in these values because accelerometer is not giving correct values. Any suggestion for my problem?
... View more