# LBLEAddress

代表 BLE 裝置的裝置位址。

此類別用於表示 BLE 的裝置位址，可用於辨認並連接到不同的 BLE 周邊裝置。請注意，不是所有的 BLE 裝置都可以被連接。

大多數情況下，開發者不需要自行建構此地址物件，而是透過比如 LBLE.getDeivceAddress() 這樣的 API 來取得所需要的裝置地址。

這個類別支援 *Printable* 介面，所以可以直接將它傳遞給  `Serial.print 函式，如下：`

```
// 印出 LBLECentral.scan() 所找到的第一個裝置的地址
Serial.print(LBLECentral.getAddress(0));
```

### Constructor <a href="#lbleaddress-constructor" id="lbleaddress-constructor"></a>

&#x20;LBLEAddress

{% tabs %}
{% tab title=" LBLEAddress" %}
預設建構式，會創建一個無效的地址。

**Syntax**

*LBLEAddress* address

**Parameters**

n/a

**Returns**

一個代表無效地址的 LBLEAddress 物件。
{% endtab %}
{% endtabs %}

### Methods <a href="#lbleaddress-methods" id="lbleaddress-methods"></a>

&#x20;toString

{% tabs %}
{% tab title="toString" %}
將地址轉換為字串表示形式

**Syntax**

*address.toString()*

**Parameters**

n/a

**Returns**

一個字串，內容是此裝置地址轉換為人類可以閱讀的字串表示形式的結果。
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cavedu.gitbook.io/linkit-7697/linkit-7697-arduinoide/kai-fa-zhi-nan/shi-yong-ble-di-gong-hao-lan-ya/lble-api-zhi-nan/lbleaddress.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
