,

Sensing Rotation with the Gyroscope

The gyroscope is an optional hardware sensor that can sense rotation. Although the accelerometer is able to gauge the orientation of the phone when it is stationary, it is not able to sense rotation. If the device is in free fall, the accelerometer reading is theoretically zero. In contrast, the gyroscope measures the rate of rotation around a particular axis, so that while the device continues to be in rotation the reading is non-zero. The disadvantage, however, is that because the gyroscope measures rotational velocity, and not position, it is subject to drift.

The sample code for this section creates a page that displays raw readings from the gyroscope, as well as providing a visual representation of the angular rotation of the device.

The sample code for this section is located in the /Sensors/Gyroscope/ directory of the WPUnleashed.Examples project in the downloadable sample code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.208.203