Exemplo n.º 1
0
 public static IoTKitHoLSensor GetCurrent(TemperatureSensor sensorKind)
 {
     if(currentSensor== null)
     {
         currentSensor = new IoTKitHoLSensor(sensorKind);
         currentSensor.Initialize();
     }
     return currentSensor;
 }
Exemplo n.º 2
0
 public static IoTKitHoLSensor GetCurrent(TemperatureSensor sensorKind)
 {
     if (currentSensor == null)
     {
         currentSensor = new IoTKitHoLSensor(sensorKind);
         currentSensor.Initialize();
     }
     return(currentSensor);
 }
Exemplo n.º 3
0
        private async void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            var result = await TryConnect();
            sensor = IoTKitHoLSensor.GetCurrent(IoTKitHoLSensor.TemperatureSensor.BME280);
            measureTimer = new DispatcherTimer();
            measureTimer.Interval = TimeSpan.FromMilliseconds(measureIntervalMSec);
            measureTimer.Tick += MeasureTimer_Tick;
            measureTimer.Start();

            InitializeUpload();
        }