Created
May 13, 2020 15:00
-
-
Save epietrowicz/28b0827b8775c38306d33f760318f9da to your computer and use it in GitHub Desktop.
get characteristics
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
bool _getLEDChar(List<BluetoothService> services) { | |
for (BluetoothService s in services) { | |
if (s.uuid.toString() == _myService) { | |
var characteristics = s.characteristics; | |
for (BluetoothCharacteristic c in characteristics) { | |
if (c.uuid.toString() == _myChar) { | |
_ledChar = c; | |
return true; | |
} | |
} | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment