addCharacteristic()



Açıklama

BLE hizmetine bir BLECharateristic ekleyin.

Sözdizimi

bleService.addCharacteristic (bleCharacteristic)

Parametreler

Yok

İadeler

Hiçbir şey değil

Misal


BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // BLE LED Service

// BLE LED Switch Characteristic - custom 128-bit UUID, readable and writable by central
BLECharacteristic switchCharacteristic("19B10001-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite, 1);


// …

// add the characteristic to the service
ledService.addCharacteristic(switchCharacteristic);

See Also