ArduinoBLE - connected()

Query if a BLE device is connected

Syntax

bleDevice.connected()

Parameters

None

Returns

true if the BLE device is connected, otherwise false.

Example


  // listen for BLE centrals to connect:
  BLEDevice central = BLE.central();

    // while the central is still connected
    while (central.connected()) {

       // ...
    }