Reference   Language | Libraries | Comparison | Changes

ArduinoBLE : BLE class

poll()

Description

Poll for BLE radio events and handle them.

Syntax

BLE.poll() BLE.poll(timeout)

Parameters

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

Returns

Nothing

Example


  // assign event handlers for connected, disconnected to peripheral
  BLE.setEventHandler(BLEConnected, blePeripheralConnectHandler);
  BLE.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler);

  // …

   BLE.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.