We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would be nice to see some expanded examples in the "multi service" area.
The text was updated successfully, but these errors were encountered:
Hmm, I'll think about this, For this moment please take a look on draft blink example based on: https://github.com/arduino-libraries/ArduinoBLE/blob/master/examples/Peripheral/LED/LED.ino
#include <ArduinoBLE.h> #include <ArduinoBleOTA.h> #include <BleOtaMultiservice.h> #define DEVICE_NAME "BLE LED OTA" #define LED_SERVICE_UUID "19B10000-E8F2-537E-4F6C-D104768A1214" #define LED_CHARACTERISTIC_UUID "19B10001-E8F2-537E-4F6C-D104768A1214" #define LED_BUILTIN 2 BLEService ledService(LED_SERVICE_UUID); // Bluetooth Low Energy LED Service BLEByteCharacteristic switchCharacteristic(LED_CHARACTERISTIC_UUID, BLERead | BLEWrite); const int ledPin = LED_BUILTIN; void setup() { Serial.begin(9600); while (!Serial); pinMode(ledPin, OUTPUT); if (!initBle(DEVICE_NAME)) { Serial.println("starting Bluetooth Low Energy module failed!"); while (1); } ledService.addCharacteristic(switchCharacteristic); BLE.addService(ledService); // set the initial value for the characeristic: switchCharacteristic.writeValue(0); ArduinoBleOTA.begin(InternalStorage); advertiseBle(DEVICE_NAME, LED_SERVICE_UUID); Serial.println("BLE LED Peripheral"); } void loop() { BLEDevice central = BLE.central(); if (central) { Serial.print("Connected to central: "); Serial.println(central.address()); while (central.connected()) { if (switchCharacteristic.written()) { if (switchCharacteristic.value()) { Serial.println("LED on"); digitalWrite(ledPin, HIGH); } else { Serial.println(F("LED off")); digitalWrite(ledPin, LOW); } } ArduinoBleOTA.pull(); } Serial.print(F("Disconnected from central: ")); Serial.println(central.address()); } }
You can use nRF Connect android application. And than:
nRF Connect
19B10000-E8F2-537E-4F6C-D104768A1214
0x00
0x01
19B10001-E8F2-537E-4F6C-D104768A1214
You sholud see ESP32 blinking LED
Sorry, something went wrong.
Here is chess device example: https://github.com/TimoKropp/OPENCHESSBOARD_BLE/blob/main/src/main.ino
vovagorodok
No branches or pull requests
Would be nice to see some expanded examples in the "multi service" area.
The text was updated successfully, but these errors were encountered: