Komut
address()
Açıklama
BLE cihazının Bluetooth adresini sorgulayın.
Sözdizimi
bleDevice.address ()
Parametreler
Yok
İadeler
BLE cihazının Bluetooth adresi ( String olarak ).
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
- discoverAttributes()
- discoverService()
- deviceName()
- appearance()
- serviceCount()
- hasService()
- service()
- characteristicCount()
- hasCharacteristic()