ArduinoBLE - poll()

Poll for BLE radio events for the specified BLE device and handle them.

Syntax

bleDevice.poll()
bleDevice.poll(timeout)

Parameters

timeout: optional timeout in ms, to wait for event. If not specified defaults to 0 ms.

Returns

Nothing

Example


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

  // if a central is connected to peripheral:
  if (central) {
    

   central.poll();

    // ...
  }