How would I use the accelerometer in WinPho7 to detect shaking the phone and have that trigger an event. For example, to roll dice, you would shake the phone.
A:
You would be after the Accelerometer class in the Microsoft.Devices.Sensors namespace.
While this quick how-to is targeted at XNA game development, it gives a good example of the usage of the Accelerometer class.
ShaunO
2010-10-19 11:40:10
+3
A:
Here are 3 solutions, each with code:
http://www.j2i.net/BlogEngine/post/2010/07/31/Detect-Shaking-Motion-on-Windows-Phone-7.aspx
http://blog.markarteaga.com/ShakeDetectionOnWindowsPhone7.aspx
http://www.codeproject.com/Articles/98492/Detect-Shaking-Motion-on-Windows-Phone-7.aspx
Matt Lacey
2010-10-19 11:51:10