Beispiel #1
0
 public static IoTKitHoLSensor GetCurrent(TemperatureSensor sensorKind)
 {
     if(currentSensor== null)
     {
         currentSensor = new IoTKitHoLSensor(sensorKind);
         currentSensor.Initialize();
     }
     return currentSensor;
 }
Beispiel #2
0
 public static IoTKitHoLSensor GetCurrent(TemperatureSensor sensorKind)
 {
     if (currentSensor == null)
     {
         currentSensor = new IoTKitHoLSensor(sensorKind);
         currentSensor.Initialize();
     }
     return(currentSensor);
 }
        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();
        }