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

            await this.Dispatcher.BeginInvoke((Action)(() => setTemperature(temp)));
        }
Ejemplo n.º 2
0
        //##Temperature
        async Task ReadTemperature()
        {
            byte[] rawData = await BLE_Utilities.ReadData(Sensor.Temperature);

            float temp = SensorConvert.convertTemperature(rawData);

            await this.Dispatcher.BeginInvoke((Action)(() => setTemperature(temp)));
        }