The data of accelerometer is 0

I got two accelerometers in my raspberry pi working at the same time. (two ranges)
one of the two is Triple Axis Accelerometer Breakout - LIS331
I connect this accelerometer to the raspberry pi.
The code is in the attached document.
The data collected in the x-direction is 0.
Would you please check the code for me?
Or how can I check if the accelerometers are good?

Hi Kai,

We’ve got a couple of boards with similar chipsets, what was the SKU number of the one you purchased from us?

Hi Sam,
The board should be ok because I got it from a team doing the similar thesis last year.
They successfully collected the data.
Now, I am not sure whether it is still in good function so I would like to check.
Is the sensitivity of the accelerometer can recognize the signal if I just move the pi from left to right?
Everything else aside, i use two accelerometers at the same time, all the data is 0.
Do you know anything about this issue?

Hi Kai,

The best way forward might be to get in touch with the people who gave the board to you and see if they can help you get it up and running.

If this is a uni project, chances are you have access to some logic analysers. I’d hook onto the data bus and take a close look at the data being passed back and forth.

1 Like