Yup I noticed that

, but shouldn't I use the acc sensitivity in this function and for the Y angle as well :

double getXangle() {

double accXval = Accx-zeroValue[0];

double accZval = Accz-zeroValue[2];

double angle = (atan2(accXval,accZval))*RAD_TO_DEG;

return angle;

I mean would be like this: (4095 = sens in 2g range)

double getXangle() {

double accXval = (Accx-zeroValue[0])/4095;

double accZval = (Accz-zeroValue[2])/4095;

double angle = (atan2(accXval,accZval))*RAD_TO_DEG;

return angle;