Reference   Language | Libraries | Comparison | Changes

ArduinoBLE : BLEDevice class

poll()

Description

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();

    // ...
  }

See Also



Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.