Donn Morse has posted sample code and a white paper here:

 http://code.msdn.microsoft.com/motionsensor

The whitepaper describes how you can build a simple motion sensor, a Sensor device driver, and a Sensor application that you can use to observe real-time sensor data in Windows 7.

The sample firmware can be used to program a Parallax BS2 microcontroller.