I’m using the accelerometer of the dIMU Sensor and i have some problems on the reading when i use this code:
#pragma config(Sensor, S2, DIMU, sensorI2CCustomFastSkipStates)
if (!DIMUconfigAccel(DIMU, DIMU_ACC_RANGE_2G))
DIMUreadAccelAxes10Bit(DIMU, x, y, z);
When I set up the program with the robot placed paralel to the floor the value of the y is 0, but if i set up the program with the robot placed perpendicular to the floor when i put the robot paralel to the floor the value of y isn’t 0, is 0,5, and i want that the accelerometer give me the same values when is in the same site no matter in wich position i set up the program, anyone can help? i will be very gateful.