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);
}
}
У меня есть проблема, когда всякий раз, когда я нажимаю «читать», он просто читает одно значение.Я установил mpu6050 с моим rfduino.Так что следует прочитать значения x, y, z.Однако в моем случае он читает только значение «z».как мне заставить его читать все три значения?
В моем c #: (читает только значение z)
В моем arduino: