Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Using the Sensor and Location Platform : Defining the sensor and location devices

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
9/22/2011 5:26:58 PM
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 about them.

1. An Overview of the Sensor Categories

Sensors provide 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.

Location devices 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
CATEGORYGROUPDESCRIPTION
AllN/AAccesses 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 system.
BioMetricEnvironmentalAll 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.
ElectricalEnvironmentalAny electrical device that doesn't fit in some other category. This category would include devices actually used to measure electricity.
EnvironmentalEnvironmentalAny 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 conditions.
LightLightAny 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.
LocationPositionAny 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.
MechanicalEnvironmentalEither 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.
MotionPositionAny 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.
OrientationPositionAny 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.
ScannerLightAny 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:

  • Invalid: 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 connected.

  • Integrated: 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.

  • Attached: 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.

  • External: 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.

NOTE

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 location.

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 system:

  1. 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.

  2. Check 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.

  3. Click Yes. The installation will proceed, and you'll eventually see a success message.

  4. 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.

  5. Open 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.
  6. Check Enabled and click Apply. The Geosense for Windows sensor is now enabled.

Other -----------------
- Using Parallel Programming in Windows 7 : Writing an application that relies on parallel processing
- Designing a Lite-Touch Deployment (part 3) - Customizing Target Deployments
- Designing a Lite-Touch Deployment (part 2) - Deploying Images to Target Computers
- Designing a Lite-Touch Deployment (part 1) - Understanding Lite-Touch Deployment Requirements
- Designing a Windows 7 Client Deployment Strategy : Choosing a Deployment Method (part 2) - Evaluating the Infrastructure & Scaling the Client Deployment Process
- Designing a Windows 7 Client Deployment Strategy : Choosing a Deployment Method (part 1) - Understanding Deployment Options & Deployment Scenarios
- Understanding the Windows 7 Deployment Process (part 4) - Using Windows System Image Manager
- Understanding the Windows 7 Deployment Process (part 3) - Using Microsoft Deployment Toolkit 2010
- Understanding the Windows 7 Deployment Process (part 2) - Using Windows 7 Automated Installation Kit
- Understanding the Windows 7 Deployment Process (part 1) - Windows 7 Deployment Basics & Using Windows Deployment Services
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server