Skip to content

Instantly share code, notes, and snippets.

@epietrowicz
Created May 13, 2020 15:00
Show Gist options
  • Save epietrowicz/28b0827b8775c38306d33f760318f9da to your computer and use it in GitHub Desktop.
Save epietrowicz/28b0827b8775c38306d33f760318f9da to your computer and use it in GitHub Desktop.
get characteristics
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