Devices. Sensors Namespace
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides access to the supported types of sensors and related motion data.
Represents an accelerometer sensor.
This sensor returns G-force values with respect to the x, y, and z axes.
For an example implementation, see the accelerometer sample.
Provides access to accelerometer data thresholds (also known as change sensitivity).
Represents an accelerometer reading.
Provides data for the accelerometer reading– changed event.
Provides data for the accelerometer-shaken event.
Represents a sensor that provides the activity and status of a sensor.
Represents the reading of an activity sensor that provides readings for the sensor.
Represents data for the reading–changed event of the sensor.
Represents data for the sensor trigger.
Represents details about the sensor triggering.
Provides the ability to manage the dimming behavior of the PC screen based on whether a user is detected by the human presence sensor.
Provides an interface for an altimetric sensor to measure the relative altitude.
For an example implementation, see the altimeter sample.
Represents an altimeter reading.
Provides data for the altimeter reading– changed event.
Provides an interface for a barometric sensor to measure atmospheric pressure.
For an example implementation, see the barometer sample.
Provides access to barometer data thresholds (also known as change sensitivity).
Represents a barometer reading.
Provides data for the barometer reading– changed event.
Represents a compass sensor.
This sensor returns a heading with respect to Magnetic North and, possibly, True North. (The latter is dependent on the system capabilities.)
For an example implementation, see the compass sample.
Provides access to compass data thresholds (also known as change sensitivity).
Represents a compass reading.
Provides data for the compass reading–changed event.
Represents a gyrometer sensor that provides angular velocity values with respect to the x, y, and z axes.
Provides access to gyrometer data thresholds (also known as change sensitivity).
Represents a gyrometer reading.
Provides data for the gyrometer reading– changed event.
Provides access to the data exposed by the hinge angle sensor in a dual-screen device.
Represents the hinge angle sensor in a dual-screen device.
Provides data for the ReadingChanged event.
Represents the system settings supported by a human presence sensor.
Represents a sensor that detects whether a user is present, absent, or not interacting with their device.
Represents a single reading from a HumanPresenceSensor.
Provides data for the HumanPresenceSensor.ReadingChanged event.
Represents the various human presence system settings.
Represents an inclinometer sensor that provides pitch, roll, and yaw values corresponding to rotation angles around the x, y, and z axes, respectively.
Provides access to inclinometer data thresholds (also known as change sensitivity).
Represents an inclinometer reading.
Provides data for the inclinometer reading-changed event.
Represents an ambient-light sensor that provides the ambient-light reading as a LUX value.
Provides access to light data thresholds (also known as change sensitivity).
Represents an ambient light–sensor reading.
Provides data for the ambient-light sensor reading-changed event.
Provides the ability to manage the locking behavior of the PC screen based on whether a user is detected by the human presence sensor.
Represents a magnetic sensor.
Provides access to magnetometer data thresholds (also known as change sensitivity).
Represents a magnetometer reading.
Provides data for the magnetometer reading– changed event.
Represents an orientation sensor.
This sensor returns a rotation matrix and a Quaternion that can be used to adjust the user's perspective in a game application.
For an example implementation, see the orientation sensor sample.
Represents an orientation-sensor reading.
Provides data for the orientation-sensor reading-changed event.
Provides an interface for a pedometer to measure the number of steps taken.
For an example implemenation, see the pedometer sample.
A threshold for the Pedometer sensor. When the threshold conditions are met, the sensor trigger will activate.
Represents a pedometer reading.
Provides data for the pedometer reading– changed event.
Provides an interface for a proximity sensor to determine whether or not an object is detected.
For an example implementation, see the proximity sensor sample.
A threshold for the ProximitySensor. When the threshold conditions are met, the sensor trigger will activate.
Provides a controller responsible for turning on or off the phone display based on the readings from the ProximitySensor.
Represents a reading from the proximity sensor.
Provides data for the reading– changed event of the proximity sensor.
Provides data for what sensor triggered the data threshold monitoring task.
Represents a Quaternion.
Represents a 3x3 rotation matrix.
Represents a simple orientation sensor.
For an example implementation, see the simple orientation sensor sample.
This sensor detects the current quadrant orientation of the specified device as well as its face-up or face-down status.
Provides data for the sensor reading–changed event.
Provides the ability to manage the waking behavior of the PC screen based on whether a user is detected by the human presence sensor.
Identifies a threshold for sensor data. When this threshold is crossed, the sensor trigger will activate.
Indicates the type of accelerometer.
Specifies the confidence of a sensor reading.
Specifies activity types of a sensor.
Specifies the possible engagement states supported by a HumanPresenceSensor.
Specifies the possible detection states supported by a HumanPresenceSensor.
The sensor's accuracy.
This short video gives an overview of how to calibrate the magnetometer's accuracy.
The type of step taken according to the pedometer.
Indicates whether power or precision should be optimized for sensors.
Specifies the sensor reading type.
Indicates the type of sensor.
Indicates the orientation of the device.
This namespace provides access to the sensor types listed in the table below. The driver for a sensor must indicate that the hardware is integrated with the PC chassis for it to be accessible via this namespace. Sensors not marked as PC-integrated, even if they are of a supported type, will not be accessible. Driver developers can refer to SensorConnectionType enumeration for more details.
|Accelerometer||Detects acceleration along three axes (x, y, and z).|
|Inclinometer||Detects angle of incline along three axes (pitch, roll, and yaw).|
|Gyrometer||Detects angular velocity along three axes.|
|Compass||Detects heading in degrees relative to magnetic north (and due north when integrated with onboard GPS).|
|Light||Detects ambient lighting level in lumens.|
|Orientation||Combines the data from the accelerometer, compass, and gyrometer sensors to provide smoother and more sensitive rotation data than can be obtained from any of the sensors alone. See the
In addition, this namespace provides access to the following motion (or movement) data.
Sensor data is provided relative to the device's fixed sensor coordinate system, and is independent of display orientation. For applications that rely on sensor data for input control or to manipulate elements on the screen, the developer must take current display orientation into account and compensate the data appropriately. For more info about the sensor coordinate system, see Sensor data and display orientation.
For some samples that demonstrate using various sensors, see Windows Sensor Samples.