When creating applications for Windows Phone 7 Series, there is no way to fully test the work with the accelerometer in the emulator. Data goes, but the emulator thinks that the phone is lying on a flat table with the screen facing up. This is frustrating, especially when you have an application tied to accelerometer events, such as games.
The most successful way is to buy a phone and debug your application already on real hardware. But, the phone is on, and my hands are itching. Interesting is the ability to use augmented reality in conjunction with the Windows Phone emulator. This is the first time that I have taken advantage of augmented reality not for “playing”, but in work.
')
Nikos Kastellanos created the project accelkit , which using a webcam and ARToolkit allows you to emulate accelerometer data when developing applications for Windows Phone.
The startup process is extremely simple, print out and cut out the phone blank. It is advisable to use heavy paper or cardboard. We start the emulator from the Visual Studio, we start the accelKit application and all. To receive events in our application from the accelerometer, you need to add classes and events from accelKit. In essence, these are the same classes (AccelerometerReadingEventArgs, etc.) only from another namespace.
The main application does two things, displays additional reality and gives us the data of the accelerometer on port 88. The application is an appeal to port 88, receiving and processing data. Here is how it looks in my case: