An accelerometer is used to measure the force generated during the acceleration. The most fundamental is the commonly-known acceleration of gravity which is 1g.
By measuring the acceleration caused by gravity, you can calculate the tilt angle of the device to the level surface. Through analyzing the dynamic acceleration, you can tell the way how the device is moving. For example, self-balancing board or hoverboard applies the acceleration sensor and gyroscope for Kalman filter and posture correction.
How ADXL345 works
The ADXL345 detects the acceleration with the sensing component at the front, and then the electric signal sensing component changes it into electric signal, which is analog. Next, the AD adapter integrated on the module will convert the analog signal into digital one.