Created
November 15, 2014 08:28
-
-
Save nolili/8d76128bb70d2263cb5a to your computer and use it in GitHub Desktop.
CBCharacteristicからデータ取り出し
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) peripheral:(CBPeripheral *)aPeripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error | |
{ | |
// 長さチェック、エラーチェックなどは省略している | |
NSData *data = characteristic.value; | |
uint8_t value[2] = {0x00, 0x00}; | |
[data getBytes:value length:2]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment