My sensor is put in a table, with no motion.
I expect that 0g in X, Y axis. And 1g in Z axis.
But It doesn't work as I expected.
Scale in graph is mg. Scale in terminal is g.
ADXL372 is configured to 1.6K ODR, 800Hz bandwidth, 370 filter settle time.
Could you check what is wrong with it?
And there is one more thing that I wanna check.
Accel data from ADXL372 is signed 12 bit. But it received as 16 bit.
So I convert it in python with twos complement.
I want you to check is it right rule?
sign_x = (accel_x & 0x800) >> 11 sign_y = (accel_y & 0x800) >> 11 sign_z = (accel_z & 0x800) >> 11 temp_x = (accel_x & 0x7FF) temp_y = (accel_y & 0x7FF) temp_z = (accel_z & 0x7FF) if sign_x == 1: convert_x = -((temp_x^0x7FF) + 1) / 10 else: convert_x = temp_x / 10 if sign_y == 1: convert_y = -((temp_y^0x7FF) + 1) / 10 else: convert_y = temp_y / 10 if sign_z == 1: convert_z = -((temp_z^0x7FF) + 1) / 10 else: convert_z = temp_z / 10 print("(%d) accel(X, Y, Z) : (%f, %f, %f)\r\n" %(count, convert_x, convert_y, convert_z))