Object function reference

_construct

A reference entry for _construct

Object function · BluetoothDevice

_construct(string identifier[, string template]) ⇒ boolean

Connects to the Bluetooth Low Energy device identified by identifier. When supplied, template is a YAML device template loaded onto the new object.

Example

YASS
$device = new BluetoothDevice("device-identifier")
print($device->is_connected())