Komut
central()
Açıklama
Bağlı olan merkezi BLE cihazını sorgulayın.
Sözdizimi
BLE.central ()
Parametreler
Yok
İadeler
Merkezi temsil BLEDevice .
Misal
…
// listen for BLE peripherals to connect:
BLEDevice central = BLE.central();
// if a central is connected to peripheral:
if (central) {
Serial.print("Connected to central: ");
// print the central's MAC address:
Serial.println(central.address());
// …
}
…
// listen for BLE peripherals to connect:
BLEDevice central = BLE.central();
// if a central is connected to peripheral:
if (central) {
Serial.print("Connected to central: ");
// print the central's MAC address:
Serial.println(central.address());
// …
}
…
See Also
- connected()
- disconnect()
- address()
- rssi()
- setAdvertisedServiceUuid()
- setAdvertisedService()
- setManufacturerData()
- setLocalName()
- setDeviceName()
- setAppearance()
- addService()
- advertise()
- stopAdvertise()
- setAdvertisingInterval()
- setConnectionInterval()
- setConnectable()