Distance Measurement Using Adxl345

Hello, everyone.

I have an ADXL345, and i need to use it to measure the distance.

For example, I would like to have the degree of movement printed on the screen as the acceleration sensor moves.

I've been looking for data on this for over a week.

But what I can find is, "It's hard," "There's a lot of errors." It was just the answer from the back.

You don't have to be exact. Somebody help me, please. :cry:

To estimate distance from acceleration, in theory simply integrate the acceleration twice with respect to time (once to get velocity, again to get position from velocity).

You will find that this does not work with consumer grade sensors, because the errors are so large, as explained here.

I think I saw the data you uploaded.

I'm really a beginner, so if you don't mind, can I know the source code?