diff --git a/examples/Peripheral/CallbackLED/CallbackLED.ino b/examples/Peripheral/CallbackLED/CallbackLED.ino index 23f67bc3..1f963b7c 100644 --- a/examples/Peripheral/CallbackLED/CallbackLED.ino +++ b/examples/Peripheral/CallbackLED/CallbackLED.ino @@ -49,9 +49,9 @@ void setup() { // add service BLE.addService(ledService); - // assign event handlers for connected, disconnected to peripheral - BLE.setEventHandler(BLEConnected, blePeripheralConnectHandler); - BLE.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler); + // assign event handlers for connected, disconnected to central + BLE.setEventHandler(BLEConnected, bleCentralConnectedHandler); + BLE.setEventHandler(BLEDisconnected, bleCentralDisconnectedHandler); // assign event handlers for characteristic switchCharacteristic.setEventHandler(BLEWritten, switchCharacteristicWritten); @@ -69,13 +69,13 @@ void loop() { BLE.poll(); } -void blePeripheralConnectHandler(BLEDevice central) { +void bleCentralConnectedHandler(BLEDevice central) { // central connected event handler Serial.print("Connected event, central: "); Serial.println(central.address()); } -void blePeripheralDisconnectHandler(BLEDevice central) { +void bleCentralDisconnectedHandler(BLEDevice central) { // central disconnected event handler Serial.print("Disconnected event, central: "); Serial.println(central.address()); diff --git a/examples/Peripheral/LED/LED.ino b/examples/Peripheral/LED/LED.ino index 2e6d6db9..dd17ba24 100644 --- a/examples/Peripheral/LED/LED.ino +++ b/examples/Peripheral/LED/LED.ino @@ -58,7 +58,7 @@ void setup() { } void loop() { - // listen for Bluetooth® Low Energy peripherals to connect: + // listen for Bluetooth® Low Energy central to connect: BLEDevice central = BLE.central(); // if a central is connected to peripheral: