LBLECharacteristic
To create characteristics, following classes are provided:
LBLECharacteristicInt
LBLECharacteristicString
These classes represents values in GATT service that can be read and write by the connected central device. These characteristic object needs to be added to a service with LBLEService::addAttribute() to be accessed by the underlying GATT server.
Constructor
LBLECharacteristicInt()
LBLECharacteristicString()
Create characteristic with an integer as value type.
In most cases the characteristic should be created in global scope, to ensure it is alive after LBLEPeripheral.begin().
Syntax
Parameters
uuid: The UUID of the characteristic.
Returns
Instance of LBLECharacteristicInt
Methods
isWritten()
getValue()
setValue()
Check if a characteristic has been updated by the remote central device.
Syntax
Parameters
none
Returns
true if the characteristic has been update by remote device.
false if the characteristic remains unchanged.
Last updated