KX134 Offset

Hi,

Just trying a simple test with the accelerometer on the end of a ruler hanging over the desk and giving it a ping.

I’ve adapted the code from https://github.com/sparkfun/Qwiic_KX13X_Py (and make a small PR to resolve minor bugs in the example files).

You can see the output in the attached image.

The output looks always to be positive. I can post process so anything above 8g has 16g subtracted from it, but …is there anything in the settings to do this, or a simple efficient way of implementing this in say the get_raw_accel_data method? (I get a bit confused with the register stuff…!)

Many thanks,

Chris

Oscilation_Pattern.png

You should be able to call the ‘raw’ data https://learn.sparkfun.com/tutorials/tr … no-library and that will still have +/- - try calling that instead of the ones that have been converted and see how that goes

Thanks for the reply, although I’ve only just seen it though!

Will try and have a look at the raw data but I seem to recall it was a similar problem (albeit it was a little while ago and memory a bit hazy!).