If you are developing a Windows Phone game or any kind of application that uses the phone movement as an input, you should probably use the Motion class. This class handles the low-level sensor calculation and allows applications to easily obtain the device’s attitude (yaw, pitch, and roll), rotational acceleration, and linear acceleration both due to gravity and user movement.
This article explains how to retrieve the pitch and roll values from the accelerometer values.
This webinar presents advanced examples of how to use sensors embedded in Nokia Asha phones in your Java™ ME apps and games. It covers the structure and use of the Mobile Sensor API (JSR-256). Conducted by Attila Csipa, technology wizard at Nokia in Tampere, Finland, the session provides a short overview that is followed by plenty of examples and coding demos. He also share best practices and user-experience recommendations based on the most common use cases.
We suggest you review the video from Attila’s introductory session (http://youtu.be/8UzM4zCpbo4) before watching this advanced webinar. You’ll get a lot out of the webinar even if you haven’t reviewed the earlier material, but you’ll learn more if you’ve done so.
Compass is a Nokia Developer Windows Phone application that has been ported from Qt to Windows Phone 8. This application combines Nokia Maps with compass sensor. It also allows user to determine the bearing to the desired direction.
This application has been tested on Nokia Lumia 920 and developed using Visual Studio 2012 Express for Windows Phone 8. To learn more on the project follow up on the wiki page.