Most smartphones and tablets come with a built-in accelerometer. An accelerometer is an electromechanical device that measures acceleration, which is the rate of change of the velocity of the phone. It measures in meters per second squared (m/s2) or in G-forces (g). An accelerometer can sense either static or dynamic forces of acceleration:
- Sense static forces, including gravity
- Sense dynamic forces, including vibrations and movement
For your smartphone or tablet, accelerometers are useful for sensing vibrations in systems or for the orientation of applications.
The accelerometer on your smartphone measures linear acceleration along x, y, and z axes. Figure 6.1 shows the x, y, and z orientation axes relative to a typical Android mobile device:
Figure 6.1: x, y, and z orientation axes for smartphone (created by Freepik)
If you place the smartphone face-up on a...