Windows 10 SDK comes with lots of new sensors which helps the users to keep health fit to know what the user needs. The new list of sensors are the following,
  	- Altimeter
  	- Activity Sensor
  	- Barometer
  	- Pedometer
  	- Proximity Sensor
  
 Let’s see the sensor in detail.
 
 To access the sensors API add the following namespace first,
 
- using Windows.Devices.Sensors;  
 
 Altimeter
 
 Altimeter helps to measure the relative altitude i.e. changes in  elevation. The Altimeter has an event called ReadingChanged and triggered  whenever a new value is sensed by the Altimeter sensor. ReportInterval property  is used to set the time interval at which the sensor has to report.  
Sample code - public void GetAltimeter()  
 - {  
 -     Altimeter getAltiude = Altimeter.GetDefault();  
 -     AltimeterReading reading = getAltiude.GetCurrentReading();  
 -     getAltiude.ReportInterval = 100;  
 -     getAltiude.ReadingChanged += GetAltiude_ReadingChanged;  
 - }  
 - private void GetAltiude_ReadingChanged(Altimeter sender, AltimeterReadingChangedEventArgs args)  
 - {  
 -     AltimeterReading readingvalues = args.Reading;  
 - }  
 
 Activity Sensor
  ActivitySensor will help to detect the user’s activity based on the user motion  context. These sensor help to detect the motion of user either walking, running, idle, etc. This sensor set to idle state when the device is without any  movement and also you can get the details up to 30 days. 
 Sample code to get the activity reading. 
- public async void GetActivity()  
 - {  
 -     ActivitySensor activity = await ActivitySensor.GetDefaultAsync();  
 -     var reading = await activity.GetCurrentReadingAsync();  
 -     activity.ReadingChanged += new TypedEventHandler < ActivitySensor, ActivitySensorReadingChangedEventArgs > (ReadingChanged);  
 - }  
 - private void ReadingChanged(ActivitySensor sender, ActivitySensorReadingChangedEventArgs args)  
 - {  
 -     ActivitySensorReading readingActivity = args.Reading;  
 - }  
 
To get the last 30 days details, 
- DateTimeOffset last30days = DateTime.Today.AddDays(-30);  
 - var details = await ActivitySensor.GetSystemHistoryAsync(last30days);  
 - foreach(var values in details)  
 - {  
 -     string newvalue = values.Activity.ToString();  
 - }  
 - var trigger = new  
 - Windows.ApplicationModel.Background.ActivitySensorTrigger(100);  
 - trigger.SubscribedActivities.Add(ActivityType.InVehicle);  
 
 Barometer
 
 The Barometer help to measure the atmospheric pressure. The Barometer  API has an event handler ReadingChanged which gets a new value is sensed by the  sensor. The ReportInterval property is used to set the interval at which the  sensor has to report. GetCurrentReading method is used to get the current  reading for the barometer.  
Sample Code
 - public async void getBarometer()  
 - {  
 -     Barometer barometerValues = Barometer.GetDefault();  
 -     BarometerReading reading = barometerValues.GetCurrentReading();  
 -     var getPressure = reading.StationPressureInHectopascals;  
 -     barometerValues.ReportInterval = 150;  
 -     barometerValues.ReadingChanged += Barometer_ReadingChanged;  
 - }  
 - private void Barometer_ReadingChanged(Barometer sender, BarometerReadingChangedEventArgs args)  
 - {  
 -     string values = args.Reading.ToString();  
 - }  
 
 Pedometer
  Pedometer help you to count the user’s steps in walking and running and you  can access history details for up to 30 days. Pedometer sensor comes with Windows Phone 10 and also in Microsoft Band.  
Sample Code
 - public async void pedometer()  
 - {  
 -     Pedometer readings = await Pedometer.GetDefaultAsync();  
 -     readings.ReportInterval = 100;  
 -     readings.ReadingChanged += Readings_ReadingChanged;  
 - }  
 - private void Readings_ReadingChanged(Pedometer sender, PedometerReadingChangedEventArgs args)  
 - {  
 -     PedometerReading readvalues = args.Reading;  
 -     if (readvalues.StepKind == PedometerStepKind.Walking)  
 -     {  
 -         var walkingsteps = readvalues.CumulativeSteps;  
 -     }  
 -     else if (readvalues.StepKind == PedometerStepKind.Running)  
 -     {  
 -         var runningSteps = readvalues.CumulativeSteps;  
 -     }  
 - }  
 - public async void gettingHistory()  
 - {  
 -     var history = await Pedometer.GetSystemHistoryAsync(DateTime.Now.AddDays(-30));  
 - }  
 
 To get the last 30 days or any day you can get it from 
GetSystemHistoryAsync  method by passing the date. This sensor mainly used to detect weather the user  has intentionally touched the display or not.  
Proximity Sensor
  Proximity sensor helps you to detect the presence of the object it supports for short and long range. You can notify this to turn off the display during phone call.  
Sample Code - ProximitySensor sensor;  
 - public void GetProximityStatus()  
 - {  
 -     DeviceWatcher watch;  
 -     watch = DeviceInformation.CreateWatcher(ProximitySensor.GetDeviceSelector());  
 -     watch.Added += Watch_Added;  
 -     watch.Start();  
 -     ProximitySensorReading reading = sensor.GetCurrentReading();  
 -     sensor.ReadingChanged += Sensor_ReadingChanged;  
 - }  
 - private void Sensor_ReadingChanged(ProximitySensor sender, ProximitySensorReadingChangedEventArgs args)  
 - {  
 -     ProximitySensorReading readStatus = args.Reading;  
 - }  
 - private void Watch_Added(DeviceWatcher sender, DeviceInformation args)  
 - {  
 -     ProximitySensor identified = ProximitySensor.FromId(args.Id);  
 -     sensor = identified;  
 - }