8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9183ca1 commit d4146adCopy full SHA for d4146ad
libraries/CurieBLE/examples/peripheral/broadcast/broadcast.ino
@@ -0,0 +1,31 @@
1
+#include <CurieBLE.h>
2
+
3
+uint8_t value = 0;
4
5
+BLEPeripheral peripheral;
6
+BLEService service = BLEService("EEE0");
7
+BLEShortCharacteristic characteristic = BLEShortCharacteristic("EEE1", BLERead | BLENotify | BLEBroadcast);
8
9
+void setup() {
10
+ Serial.begin(9600);
11
12
+ peripheral.setLocalName("BLEBroadcast");
13
+ peripheral.setAdvertisedServiceUuid(service.uuid());
14
15
+ peripheral.addAttribute(service);
16
+ peripheral.addAttribute(characteristic);
17
18
+ characteristic.setValue(value);
19
20
+ peripheral.begin();
21
+ characteristic.broadcast();
22
23
+ Serial.println(F("BLE Broadcast Count"));
24
+}
25
26
+void loop() {
27
+ peripheral.poll();
28
29
+ delay(1000);
30
+ value++;
31
0 commit comments