ArduinoBLE
ArduinoBLE copied to clipboard
Implement functions to retrieve multiple connected devices
These functions can be used to loop the connected devices, centrals or peripherals, through an index that can go from 0 to the maximum number of connected devices allowed. Example:
for (int periphIdx = 0; periphIdx < BLE.peripheralCount(); periphIdx++) {
BLEDevice peripheral = BLE.peripheral(periphIdx);
if (peripheral) {
BLECharacteristic batteryLevelChar = peripheral.characteristic("2A19");
if (!batteryLevelChar) {
Serial.println("Peripheral does not have battery level characteristic!");
peripheral.disconnect();
}
}
}
I need this functionality for my project. Has this library lost support?