From 98cd2290d036a4e27db061a76a512b526ef1cc14 Mon Sep 17 00:00:00 2001 From: kolban Date: Fri, 13 Oct 2017 13:26:21 -0500 Subject: Sync for 0.4.5 --- examples/BLE_notify/BLE_notify.ino | 2 +- examples/BLE_server/BLE_server.ino | 6 ++---- examples/BLE_uart/BLE_uart.ino | 2 +- examples/BLE_write/BLE_write.ino | 7 ++----- library.properties | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/examples/BLE_notify/BLE_notify.ino b/examples/BLE_notify/BLE_notify.ino index 44506c2..8d329c2 100644 --- a/examples/BLE_notify/BLE_notify.ino +++ b/examples/BLE_notify/BLE_notify.ino @@ -53,7 +53,7 @@ void setup() { BLEDevice::init("MyESP32"); // Create the BLE Server - BLEServer *pServer = new BLEServer(); + BLEServer *pServer = BLEDevice::createServer(); pServer->setCallbacks(new MyServerCallbacks()); // Create the BLE Service diff --git a/examples/BLE_server/BLE_server.ino b/examples/BLE_server/BLE_server.ino index 45ebf99..38224a6 100644 --- a/examples/BLE_server/BLE_server.ino +++ b/examples/BLE_server/BLE_server.ino @@ -7,8 +7,6 @@ #include #include -BLEDevice ble; - // See the following for generating UUIDs: // https://www.uuidgenerator.net/ @@ -19,8 +17,8 @@ void setup() { Serial.begin(115200); Serial.println("Starting BLE work!"); - ble.init("MyESP32"); - BLEServer *pServer = new BLEServer(); + BLEDevice::init("MyESP32"); + BLEServer *pServer = BLEDevice::createServer(); BLEService *pService = pServer->createService(SERVICE_UUID); BLECharacteristic *pCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID, diff --git a/examples/BLE_uart/BLE_uart.ino b/examples/BLE_uart/BLE_uart.ino index a8ab2d7..a348a66 100644 --- a/examples/BLE_uart/BLE_uart.ino +++ b/examples/BLE_uart/BLE_uart.ino @@ -70,7 +70,7 @@ void setup() { BLEDevice::init("UART Service"); // Create the BLE Server - BLEServer *pServer = new BLEServer(); + BLEServer *pServer = BLEDevice::createServer(); pServer->setCallbacks(new MyServerCallbacks()); // Create the BLE Service diff --git a/examples/BLE_write/BLE_write.ino b/examples/BLE_write/BLE_write.ino index ed5ebc6..24a0cd2 100644 --- a/examples/BLE_write/BLE_write.ino +++ b/examples/BLE_write/BLE_write.ino @@ -7,8 +7,6 @@ #include #include -BLEDevice ble; - // See the following for generating UUIDs: // https://www.uuidgenerator.net/ @@ -41,9 +39,8 @@ void setup() { Serial.println("4- Go to CUSTOM CHARACTERISTIC in CUSTOM SERVICE and write something"); Serial.println("5- See the magic =)"); - //ble.begin("MyESP32"); - ble.init("MyESP32"); - BLEServer *pServer = new BLEServer(); + BLEDevice::init("MyESP32"); + BLEServer *pServer = BLEDevice::createServer(); BLEService *pService = pServer->createService(SERVICE_UUID); diff --git a/library.properties b/library.properties index fdfc673..779706d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP32 BLE Arduino -version=0.4.4 +version=0.4.5 author=Neil Kolban maintainer=Neil Kolban sentence=BLE functions for ESP32 -- cgit v1.2.3