Ejemplo n.º 1
0
        async void NotifyHumidity(GattCharacteristic sender, GattValueChangedEventArgs args)
        {
            byte[] rawData = BLE_Utilities.getDataBytes(args);
            float  acthum  = SensorConvert.convertHumidity(rawData);

            await this.Dispatcher.BeginInvoke((Action)(() => setHumidity(acthum)));
        }
Ejemplo n.º 2
0
        //## Humidity
        async Task ReadHumidity()
        {
            byte[] rawData = await BLE_Utilities.ReadData(Sensor.Humidity);

            float acthum = SensorConvert.convertHumidity(rawData);

            await this.Dispatcher.BeginInvoke((Action)(() => setHumidity(acthum)));
        }