Sample Application: Sensor Explorer

Abstract


This sample application demonstrates how to access sensor information from a Windows 8 desktop program. The sample includes a structure for the COM events, showing how to register for and receive the sensor events as they happen. The sample also demonstrates traversing through every available sensor on the system and gives useful samples for formatting the individual data types. Links are provided for reference. Sensor support is provided through the Windows COM interface and is supported in both Windows 7 and Windows8. To get sensor data the destination system needs to have the Sensor Manager running, which means the sensor drivers and underlying system are running.

Article


Sample Application: Sensor Explorer Whitepaper

Download Source Code


sensorexplorer-v1.0.zip(281.52 KB)

Sensor Explorer Images


System Requirements


Hardware:

  • CPU: Intel® Core™ i5 or better suggested
  • OS: Microsoft Windows* 7 or Microsoft Windows* 8 (Sensor capable with drivers installed)
  • Memory: 2 GB of RAM or better

Software requirements for binary:

  • Redistributables: Microsoft Visual C++* 2012 Redistributable Package (x86 or x64)

Software requirements for building:

  • Compilers supported: Microsoft Visual Studio* 2012, Intel® C++ Compiler version 11
  • Libraries required: Microsoft Sensor API through sensorapi.h and sensors.h

License


Intel sample sources are provided to users under the Intel Sample Source Code License Agreement

For more complete information about compiler optimizations, see our Optimization Notice.
AttachmentSize
Package icon sensorexplorer-v1.0.zip281.52 KB

2 comments

Top
Guillaume E.'s picture

Hello,

i just tried your software, in my case, the GPS sensor is listed as "Not Available", but my Windows 8 Tablet does have a GPS (Broadcom GNSS)...

the location service is activated in my system preferences.

What should i do to receive data from this sensor ?

Cheers,

Guillaume

JackRose's picture

Hi Dale

I'm try to get Quaternion array data but failed, here is my code :

// get by type -- OK
    hr = pSensorManager->GetSensorsByType(SENSOR_TYPE_AGGREGATED_DEVICE_ORIENTATION, &pSensorColl);
 

// get value by SENSOR_DATA_TYPE_QUATERNION -- failed

hr = pReport->GetSensorValue(SENSOR_DATA_TYPE_QUATERNION, &pvQuaternion);
        
        if(SUCCEEDED(hr))
        {   if (pvQuaternion.vt == VT_UI1|VT_VECTOR)  { } }

Please advise! thanks!

 

 

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.