Why are the readings from Arduino and Raspberry PI4 different with kx13x accelerometer

I have copied the exact codes from the github https://github.com/sparkfun/Qwiic_KX13X_Py and the sparksfun arduino library.

The results from my Arduino makes sense as when I move the sensor readings change to a sin wave with peak being around 1.5, min value around 0.5 and average around 1. However for the Raspberry PI, the value hovers around 0.016 to 0 and does not have the similar spike or change as compared to the Arduino. I am unsure of how to edit the qwiic_kx13x code such that the results would be similar to the one on the Arduino

Are you using the KX132 or KX134? The line for that needs to be uncommented/correct. Share photos/diagrams of each one’s wiring (arduino, Pi) - are they both supplying matching voltages and using the same bus? Are other sensors giving normal readings on the Pi?

I am having the same issue on my KX134 accelerometer. The Arduino values seem reasonable & x/y/z change when I move the accelerometer around. However, the Pi values (using the provided python library) are similar to the poster above around 0.03 - 0.06 but don’t change with moving the accelerometer around.

For the Arduino – I used a PCA9306 5V-3.3V converter to convert the I2C lines to 3.3V & used the 3.3V pin from the Arduino for power

For the Pi – I used the 3.3V I2C pins directly & the 3.3V power pin from the Pi