0

I am using an ADXL345 accelerometer connected to a Raspberry Pi 3B+.I have written a python code to check the acceleration value. However, the accelerometer always shows a non-zero value for the x and y axes and a constant value for the z-axis even when stationary. Doesn't seem to be an error of the code as I have taken it from the documentation. I am a beginner so any kind of help is appreciated.

3
  • Are you using SPI or I2C? SPI is not 0,0 mode. Perhaps you can show us your code.
    – tlfong01
    Feb 20 at 9:06
  • Is it showing gravity? You may need to cancel that out.
    – CoderMike
    Feb 20 at 9:47
  • No code - can't check the code. No photo - can't check the connections. No results - can't check the results. The z-axis should show 1g when stationary (the force created by the surface it is resting on).
    – joan
    Feb 20 at 9:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.