Using the Windows 7 Sensor and Location Platform from C#

« Twitter Surpasses 70,000 Apps | Main | Microsoft Previews IE 9 »
 March 11, 2010
Share |

PCs are very versatile in their connectivity with different devices. For instance with USB alone, you can connect thousands of different devices, many of which could be considered to be sensors of some kind. But what is a sensor, really?

A sensor, in the Windows 7 sense, is a device that is capable of metering the physical outside world. For instance, a sensor could detect the current temperature, ambient light level, location (as in GPS), acceleration in 3D, and so forth. All in all, many different devices fit into this broad definition.

In this article, you will learn about the Sensor and Location Platform, which is part of Windows 7. You will also learn how .NET and C# developers can access the features of this platform from their .NET applications. For instance, .NET 4.0 provides a new namespace that allows you to directly access location sensors using a convenient, managed code API.

This article assumes you are using the Microsoft Visual Studio 2010 Release Candidate (RC) version or later. The new location classes in .NET 4.0 have changed since the previous Beta 2 release, so if you are using the older beta, you will need to adjust the code. As for the sensor examples with Windows API Code Pack, version v1.0.1 was used. Remember that the code pack can be used with both Microsoft Visual Studio 2008 and 2010 (including Beta 2 and RC versions)....

Continue reading this article

Source: codeguru.com


©2011 ZIPtechnologies.com, All Rights Reserved
"There is an evil tendency underlying all our technology - the tendency to do what is reasonable even when it isn't any good." - Robert Pirsig, Zen and the Art of Motorcycle Maintenance