Chapter 4. Using the Accelerometer
An accelerometer measures the linear acceleration of the device. The original iPhone, and first generation iPod touch, use the LIS302DL 3-axis MEMS based accelerometer produced by STMicroelectronics. Later iPhone and iPod touch models use a similar LIS331DL chip, also manufactured by STMicroelectronics.
Both of these accelerometers can operate in two modes, allowing the chip to measure either ±2g and ±8g. In both modes the chip can sample at either 100 Mhz or 400 Mhz. Apple operates the accelerometer in the ±2g mode (presumably at 100 Mhz) with a nominal resolution of 0.018g. In the ±8g mode the resolution would be four times coarser, and the presumption must be that Apple decided better resolution would be more useful than a wider range. Under normal conditions the device will actually measure g-forces to approximately ±2.3g however measurements above a 2g are uncalibrated.
Note
While it should in theory be possible to change the operating mode of the accelerometer, there is currently no published API that allows you to do so within the SDK.
About the Accelerometer
The iPhone’s accelerometer measures the linear acceleration of the device so it can report the device’s roll and pitch, but not its yaw. If you are dealing with a device that has a digital compass you can combine the accelerometer and magnetometer readings to have roll, pitch, and yaw measurements (see Chapter 5 for details on how to access the magnetometer).
Note
Yaw, pitch, and roll refer ...