Sensors and location devices are two separate kinds
of input for a computer system. Sensors provide environmental
information of some sort, while location devices tell you where you are.The following sections describe
the kinds of devices that Windows 7 can interact with and tell you a bit
1. An Overview of the Sensor Categories
special functionality to computer systems. The term specifically applies
to a device that mimics our own senses in some way. For example,
sensors can detect light or sound. A special sensor may provide some
type of tactile feedback. Of course, sensors can go well beyond human
senses. A light detector can see into the infrared or ultraviolet
ranges, neither of which is detectable by human eyes. So sensors can
also augment human senses to let us detect things that are normally
undetectable. No matter what the sensor does, however, it must convert
what it detects into an electrical signal that the computer can
interpret. The software you create assigns value to the electrical
impulses and presents the resulting information in a form that the human
viewer can understand.
are completely different from sensors. The vast majority of location
devices today work on the Global Positioning System (GPS), which is an
array of satellites that provides positional information in the form of
radio waves. In sum, the location device is a special sort of radio
receiver in most cases. When working with a GPS device, Windows receives
actual satellite data, not electrical impulses. Your software accepts
this data and formats it in a way that the human viewer can understand.
Another category of
location device performs some sort of measurement and presents that
measurement in the form of data or electrical impulses, depending on the
characteristics of the device. For example, a location device could use
a laser to measure the distance from the device to a wall. The output
could be in the form of data (so many feet) or electrical impulse (a
voltage level that falls within a minimum to a maximum value). The
difference between the two categories of location devices is absolute
versus relative position. A GPS device provides an absolute position,
while the second location device category provides relative position.
The SensorCategories class provides a listing of sensor categories you can interact with. Table 1 provides a listing of these categories and describes them.
Table 1. Categories of Sensors Supported by Windows 7
all the sensors, no matter what category each sensor is in. This is the
category you use to perform tasks such as obtaining an inventory of the
biometric devices, such as fingerprint or retina readers. The biometric
device need not be security-related. For example, biometric devices can
interpret a person's condition and locate potential health issues.|
electrical device that doesn't fit in some other category. This
category would include devices actually used to measure electricity.|
device used to measure environmental conditions, such as temperature
and humidity. Some unusual devices might fit into this category, such as
a device used to measure static electricity based on environmental
device used to measure light. The device could simply measure the
amount of light, but there could also be devices used for detecting
certain kinds of light.|
GPS device used to measure an absolute position based on satellite
information. Theoretically, this category could also include input from
LOng RAnge Navigation (LORAN) devices (see http://www.navcen.uscg.gov/?pageName=loranMain), but such devices are outdated and GPS is probably the only input device you'll see in use.|
an output or an input device used to measure something mechanically.
For example, a device of this type could measure how far a door is
opened or the amount of force applied to a test frame.|
device used to measure direction and velocity. These devices normally
employ accelerometers, but could also rely on other means of detecting
motion. See http://www.dimensionengineering.com/accelerometers.htm for a description of how accelerometers work.|
device used to measure angular rotation about a center of mass. The
measurements are normally made in terms of roll, pitch, and yaw. Even
though these terms are normally applied to ships and airplanes, they can
apply to anything. See http://en.wikipedia.org/wiki/Flight_dynamics for a description of roll, pitch, and yaw.|
device that captures an image of some type. These devices naturally
include scanners, but cameras could also appear in this category, as
could telescopes configured to connect to a computer. Generally, this
category includes any device that contains a Charge-Coupled Device (CCD)
or its equivalent.|
The sensors are also categorized by how they're accessed. The SensorConnectionType enumeration tells you how the sensor is connected to the system. You'll see one of the following options:
Essentially, the system doesn't know how the device is connected. There
might be something wrong with the device configuration. More likely,
the device has been turned off so the system can't see how it's
The device is built into the computer. Normally, this means that the
device is part of the motherboard or is a peripheral directly attached
to the motherboard.
The device is attached to the computer indirectly. In most cases, the
device attaches through a peripheral device or through an external port.
The device may be connected through the USB port.
The device uses an external connection. In many cases, this means that
the device is attached through a network connection. The device may be
on an external system and shared. The device could also be
network-capable and have its own network connection.
It's one thing to
understand the mechanics of sensors, but quite another to see them in
action. One of the more interesting uses of sensors in Windows 7 is
adjusting monitors to match ambient light conditions. This feature is
especially useful for laptops and other mobile devices. The article at http://www.windows7news.com/2008/10/29/windows-7-sensors-explained/ shows the effect of using ambient light sensors to adjust the monitor output.
2. Software Devices
You might not think that
software can provide sensor capabilities, but it can. Windows 7 can work
with software that performs analysis and creates sensor-like output.
For example, you need not rely on a physical GPS to determine your
position. It's possible to obtain a reasonably precise location using
Wireless Fidelity (WiFi) connections (IEEE 802.11b wireless networking).
For that matter, if you're willing to entertain a little less
precision, you can use your IP connection as a means of determining
You might think that your system contains a wealth of
sensors, but Windows 7 has shown itself extremely picky about what it
considers a sensor. Only device drivers written as sensors actually
appear as sensors when you check them. Consequently, your system filled
with sensors might actually report that it has no sensors at all, as
shown in Figure 1, when you run the example application.
Figure 1. Many people are surprised to find that their system doesn't have any detectable sensors.
Fortunately, you can add a
usable sensor for experimentation and testing purposes that works just
fine even on a desktop system. The Geosense for Windows driver is a free
download from http://www.geosenseforwindows.com/.
Download either the 32-bit or 64-bit driver as required for your
machine. Follow these steps to install the software sensor on your
Double-click the Geosense_1.2_x86.MSI or Geosense_1.2_x64.MSI file. You'll see a rather humorous licensing agreement and its equally silly condition.
I Authorize You to Slap Me if I Violate the Terms Above and click
Install. After a few seconds, you'll see the usual UAC warning.
Click Yes. The installation will proceed, and you'll eventually see a success message.
Click Finish. If your only goal is to determine how
Windows installs sensors, you can stop now. However, if you want to see
how sensors work, you'll need to proceed to Step 5.
the Location and Other Sensors applet in the Control Panel. You'll see a
list of sensors installed on your system, as shown in Figure 2 (the Geosense for Windows sensor might be the only entry on the list).
Figure 2. The Geosense for Windows sensor is disabled by default.
Check Enabled and click Apply. The Geosense for Windows sensor is now enabled.