Start scanning for Bluetooth® Low Energy devices that are advertising with a particular (local) name.
BLE.scanForName(name)
BLE.scanForName(name, withDuplicates)
// begin initialization
if (!BLE.begin()) {
Serial.println("starting Bluetooth® Low Energy module failed!");
while (1);
}
Serial.println("BLE Central scan");
// start scanning for peripheral
BLE.scanForName("LED");
BLEDevice peripheral = BLE.available();
if (peripheral) {
// ...
}