Exemplo n.º 1
0
        //## Gyroscope
        async Task ReadGyroscope()
        {
            byte[] rawData = await BLE_Utilities.ReadData(Sensor.Gyroscope);

            float[] vals = SensorConvert.convertGyroscope(rawData);
            await this.Dispatcher.BeginInvoke((Action)(() => setGyroscope(vals[0], vals[1], vals[2])));
        }
Exemplo n.º 2
0
 async void NotifyGyroscope(GattCharacteristic sender, GattValueChangedEventArgs args)
 {
     byte[]  rawData = BLE_Utilities.getDataBytes(args);
     float[] vals    = SensorConvert.convertGyroscope(rawData);
     await this.Dispatcher.BeginInvoke((Action)(() => setGyroscope(vals[0], vals[1], vals[2])));
 }