diff options
author | kolban <kolban1@kolban.com> | 2017-10-13 13:26:21 -0500 |
---|---|---|
committer | kolban <kolban1@kolban.com> | 2017-10-13 13:26:21 -0500 |
commit | 98cd2290d036a4e27db061a76a512b526ef1cc14 (patch) | |
tree | 8c9264eb6af3a1fcffce84befded491a8af4517f | |
parent | Sync for 0.4.4 (diff) | |
download | thermostat-98cd2290d036a4e27db061a76a512b526ef1cc14.tar.gz thermostat-98cd2290d036a4e27db061a76a512b526ef1cc14.tar.bz2 thermostat-98cd2290d036a4e27db061a76a512b526ef1cc14.zip |
Sync for 0.4.5
-rw-r--r-- | examples/BLE_notify/BLE_notify.ino | 2 | ||||
-rw-r--r-- | examples/BLE_server/BLE_server.ino | 6 | ||||
-rw-r--r-- | examples/BLE_uart/BLE_uart.ino | 2 | ||||
-rw-r--r-- | examples/BLE_write/BLE_write.ino | 7 | ||||
-rw-r--r-- | 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 <BLEUtils.h> #include <BLEServer.h> -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 <BLEUtils.h> #include <BLEServer.h> -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 <kolban1@kolban.com> maintainer=Neil Kolban <kolban1@kolban.com> sentence=BLE functions for ESP32 |