summaryrefslogtreecommitdiff
path: root/examples/BLE_server/BLE_server.ino
diff options
context:
space:
mode:
Diffstat (limited to 'examples/BLE_server/BLE_server.ino')
-rw-r--r--examples/BLE_server/BLE_server.ino6
1 files changed, 2 insertions, 4 deletions
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,