Hello Mike,
That seems to be better now thanks.
Code: Select all
xla = self.accel.readS8(self.LSM303_REGISTER_ACCEL_OUT_X_L_A)
xha = self.accel.readS8(self.LSM303_REGISTER_ACCEL_OUT_X_H_A)
yla = self.accel.readS8(self.LSM303_REGISTER_ACCEL_OUT_Y_L_A)
yha = self.accel.readS8(self.LSM303_REGISTER_ACCEL_OUT_Y_H_A)
zla = self.accel.readS8(self.LSM303_REGISTER_ACCEL_OUT_Z_L_A)
zha = self.accel.readS8(self.LSM303_REGISTER_ACCEL_OUT_Z_H_A)
a.x = xha << 8 | xla
a.y = yha << 8 | yla
a.z = zha << 8 | zla
when the IMU is on my desk no movement at all i have the below 0.5 seconds responses for the above code
Code: Select all
-16 -48 -15792
-16 -16 -80
-256 -32 -80
-208 -48 -96
-240 -224 -48
-256 -240 -96
-208 -240 -128
-64 -96 -15808
-192 -240 -15792
-224 -32 -15760
-224 -32 -80
-224 -16 -15776
-240 -32 -15776
-240 -32 -80
-240 -48 -96
-208 -16 -80
-32 -32 -96
-240 -224 -15600
-240 -240 -64
-32 -240 -64
-192 -256 -48
-192 -32 -64
-16 -240 -96
-208 -32 -32
-240 -32 -80
-240 -256 -112
-224 -240 -112
-240 -240 -96
-240 -224 -80
-32 -64 -96
-32 -16 -48
-240 -224 -80
-256 -192 -16
-48 -240 -64
-224 -16 -112
-32 -64 -96
-208 -208 -16
-256 -240 -64
-32 -32 -128
-240 -16 -112
-224 -32 -15616
-16 -96 -96
-240 -256 -48
-16 -224 -64
-240 -48 -64
-16 -16 -112
-256 -80 -48
-16 -256 -48
-16 -224 -48
-240 -32 -48
-160 -256 -96
-240 -16 -64
-256 -80 -128
-256 -224 -48
-256 -240 -80
-16 -256 -48
-224 -48 -15584
-256 -48 -16
-208 -96 -96
-208 -16 -48
-224 -48 -80
-48 -256 -80
-240 -224 -32
-32 -256 -64
-256 -48 -112
-16 -48 -96
-240 -256 -112
-32 -16 -64
-64 -48 -112
-32 -256 -80
-32 -240 -80
-256 -64 -80
-224 -32 -112
-32 -224 -64
-16 -256 -64
-208 -256 -32
-176 -32 -112
-32 -16 -80
-208 -256 -112
-208 -16 -96
-16 -64 -16
-256 -32 -32
-224 -32 -48
-256 -48 -15600
-256 -224 -64
-208 -256 -80
-16 -240 -128
-16 -240 -128
-240 -48 -80
-16 -64 -128
-16 -16 -32
-224 -48 -112
-48 -256 -32
-48 -240 -64
-32 -256 -15584
-16 -48 -80
-208 -224 -48
-16 -256 -112
-32 -16 -48
-16 -256 -80
-224 -240 -128
-80 -240 -112
-64 -16 -128
-48 -64 -96
-224 -64 -128
-240 -256 -16
-48 -16 -80
-256 -208 -112
-16 -16 -32
-16 -96 -32
-256 -256 -16
-256 -32 -128
-16 -64 -15552
-16 -240 -15616
-208 -32 -96
-240 -16 -80
-224 -64 -15808
-240 -32 -112
-240 -32 -96
-256 -48 -64
-208 -48 -80
-240 -256 -48
-16 -48 -128
-32 -48 -15760
-32 -80 -48
-224 -64 -15776
-224 -256 -15616
-208 -224 -96
-240 -176 -16
-224 -224 -64
-192 -32 -80
-16 -48 -15600
-256 -256 -128
-32 -256 -80
-240 -16 -80
-224 -16 -96
-240 -240 -32
-240 -64 -80
-224 -224 -128
-256 -224 -48
-112 -16 -112
-16 -48 -128
-240 -64 -32
-208 -16 -15760
-32 -224 -48
-240 -48 -128
-16 -32 -128
-240 -16 -96
-256 -256 -80
-208 -256 -112
BANNED results are showing almost 0 movement.
Code: Select all
21 80 80
21 80 80
22 80 79
22 79 79
22 79 78
22 79 80
22 80 79
22 80 79
23 80 80
22 79 79
22 80 78
21 79 79
22 79 79
22 80 78
22 80 79
22 79 79
22 79 79
21 80 80
22 79 79
22 79 80
22 81 80
23 79 79
22 80 80
what am i doing wrong?
LSM303_REGISTER_ACCEL_CTRL_REG1_A is set to 0x47
LSM303_REGISTER_ACCEL_CTRL_REG4_A is set to 0x08