【发布时间】:2018-05-27 01:23:17
【问题描述】:
private async void CharacteristicReadButton_Click()
{
// BT_Code: Read the actual value from the device by using Uncached.
GattReadResult result = await selectedCharacteristic.ReadValueAsync(BluetoothCacheMode.Uncached);
if (result.Status == GattCommunicationStatus.Success)
{
string formattedResult = FormatValueByPresentation(result.Value, presentationFormat);
rootPage.NotifyUser($"Read result: {formattedResult}", NotifyType.StatusMessage);
}
else
{
rootPage.NotifyUser($"Read failed: {result.Status}", NotifyType.ErrorMessage);
}
}
我有这个问题,每当我按“读取”时,它只会读取一个值。我已经用我的 rfduino 设置了一个 mpu6050。所以它应该读取 x 、 y 、 z 值。但是,就我而言,它只读取“z”值。如何让它读取所有三个值?
【问题讨论】:
标签: c# uwp bluetooth-lowenergy