Presentation is loading. Please wait.

Presentation is loading. Please wait.

Win8 on Intel Programming Course Modern UI : Sensors Cédric Andreolli Intel Software.

Similar presentations


Presentation on theme: "Win8 on Intel Programming Course Modern UI : Sensors Cédric Andreolli Intel Software."— Presentation transcript:

1 Win8 on Intel Programming Course Modern UI : Sensors Cédric Andreolli www.Intel-Software-Academic-Program.com paul.guermonprez@intel.com Intel Software 2013-03-20

2 Sensors

3 Sensors in few words Sensors convert a physical measure into a signal Sensors are used for Temperature Device Location : GPS Orientation Etc Sensors are used in mobile development since many years They are already available on tablet and on some Ultrabooks

4 Sensors Why use sensors Using sensors can improve the user experience They are used in games They are used in augmented reality They are used in GPS application A lot of mobile applications use sensors today !

5 Different kinds of sensors

6 Sensors Device location GPS is the most popular kind of sensor The GPS acquire the user position from satellites Wi-Fi can also be used (WPS) Give access to : Latitude Longitude Altitude

7 Sensors Accelerometer Compute the proper acceleration of an object An accelerometer contains 3 sensors : One for the x-axis One for the y-axis One for the z-axis An accelerometer that lay on a table will measure g=-9.81 m/s on the z-axis

8 Sensors Gyrometer It measures rotational velocity It doesn’t define a position but the current rotation speed Data difficult to use directly

9 Sensors Magnetometer Measures the strenght of a magnetic field Can be used to compute the device orientation

10 Sensors Light sensor Measures the intensity of light in Lux Windows 8 uses the light sensor to set the screen luminosity

11 Sensor fusion

12 What is the sensor fusion A single sensor do not provide clean data It is very hard to get a stable device orientation The value of a single sensor can suffer from interference Fusionning sensors can help solving this problem

13 Sensor fusion How does it work ? The fusion of the 3 default sensors gives access to : Compass + Inclinometer + Orientation

14 Programming with sensors

15 Access and Rights Some sensors give access to personal information Example : GPS gives the user’s current position You need to activate new capabilities Open the manifest and go to “Capabilities”

16 Programming with sensors

17 Windows.Devices.Sensors Namespace that gives access to the sensors. References : Accelerometer Compass Gyrometer Inclinometer LightSensor etc … Use the GetDefault() method to access the device : Var accelerometer = Windows.Devices.Sensors.Accelerometer.GetDefault()

18 Programming with sensors The Accelerometer Easy to implement Not so easy to use Represent the proper acceleration on each axis Interferences can modify the value Lets see how to retrieve the values of this sensor

19 Programming with sensors The Accelerometer – full code

20 Programming with sensors The Light Sensor – full code

21 Programming with sensors The Location service Implementation of the location service is different Using the location can be very interesting Show some places of interest near your position Indicates your current location to a friend etc … A lot of augmented reality applications use GPS

22 Programming with sensors

23 The Location Service – full code

24 Programming with sensors The Location Service – here’s how it looks

25

26 License Creative Commons – By 3.0 You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work to make commercial use of the work Under the following conditions: Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). With the understanding that: Waiver — Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights — In no way are any of the following rights affected by the license: – Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; – The author's moral rights; – Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. http://creativecommons.org/licenses/by/3.0/


Download ppt "Win8 on Intel Programming Course Modern UI : Sensors Cédric Andreolli Intel Software."

Similar presentations


Ads by Google