當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Arduino ArduinoBLE - bleDescriptor.readValue()用法及代碼示例

讀取說明符的當前值。如果說明符在遠程設備上,將發送讀取請求。

用法

bleDescriptor.readValue(buffer, length)
bleDescriptor.readValue(value)

參數

  • buffer: 將值讀入的字節數組
  • length: 緩衝區參數的大小(以字節為單位)
  • value: 將值讀入的變量(通過引用)

返回

  • Number of bytes

示例


  byte value = 0;

  /get the value, descriptor is 1 byte so use byte value    
  descriptor.readValue(value);


相關用法


注:本文由純淨天空篩選整理自arduino.cc大神的英文原創作品 ArduinoBLE - bleDescriptor.readValue()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。