MSDN Archive Home
Help and FAQs
Using Windows 7 to Monitor a Motion Sensor
All Resource Updates
Change History (all pages)
Includes a whitepaper as well as sample: firmware, driver, and application.
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.
The sample driver supports communication between a Windows 7 application and the sensor. (Note that in addition to a passive-infrared motion sensor, the driver also supports a compass, a 2-axis accelerometer, and an ultra-sonic distance sensor.)
The sample application demonstrates the use of the Windows 7 Sensor API to acquire sensor data. With very little work, you can modify this application so that it receives data from any of the three other sensors which the driver supports.
The Sample Application
The sample application was written in C# with less than 170 lines of code. The application logs a timestamp when it detects motion; it also logs the current sensor interval in milliseconds. (This is the interval at which the sensor reports data to the application.) In addition to reporting motion events, the application also monitors the sensor state: If the sensor has been disconnected, or powered-down, the application displays a message box indicating that the sensor is disconnected. And, once the user reconnects the sensor, the application displays another message box indicating that the sensor is back online.
The Sample Circuit
The sample circuit was created using the Parallax BS2 programmable microcontroller, the BASIC Stamp Homework Board, and the Parallax PIR sensor:
Jan 12 2010 at 9:46 PM
, version 12
Sign in to add a comment
Updated Driver and Fir...
Tue Feb 16 2010 at 8:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.