Skip to content

Commit f0ca568

Browse files
committed
update service specs
1 parent ca4bbc5 commit f0ca568

File tree

1 file changed

+55
-12
lines changed

1 file changed

+55
-12
lines changed

libraries/Bluefruit52Lib/examples/Peripheral/cplay_bluefruit/cplay_bluefruit.ino

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,60 @@ BLEDis bledis; // device information
2222
BLEUart bleuart; // uart over ble
2323
BLEBas blebas; // battery
2424

25-
// Base UUID : ADAF0000-C332-42A8-93BD-25E905756CB8
26-
27-
/* CPB Temperature
28-
* - Service: ADAF-0001-C332-42A8-93BD-25E905756CB8
29-
* - Temperature Celsius : 0x2A6E
30-
* - Measurement Interval : 0x2A21
25+
/* All Adafruit Service/Characteristic UUID128 share the same
26+
* Base UUID : ADAF0000-C332-42A8-93BD-25E905756CB8
27+
*
28+
* Temperature service 0100
29+
* - Temperature 0101 | float | Read + Notify | degree in Celsius
30+
* - Measurement Period 0001 | uint32_t | Read + Write
31+
*
32+
* Accelerometer service 0200
33+
* - Accel Data 0201 | float (x, y, z) | Read + Notify | accel x, y, z
34+
* - Measurement Period 0001 | uint32_t | Read + Write
35+
*
36+
* Light sensor service 0300
37+
* - Light Data 0301 | uint16_t | Read + Notify
38+
* - Measurement Period 0001 | uint32_t | Read + Write
39+
*
40+
* Sound sensor service 0400
41+
* - Sound Data 0401 | int16_t | Read + Notify
42+
* - Measurement Period 0001 | uint32_t | Read + Write
43+
*
44+
* Captouch service 0500
45+
* - Sensitivity 0501 | uint32_t | difference that Capn should report immediately
46+
* - Cap0 0510 | int32_t | Read + Notify
47+
* - .........................
48+
* - Cap7 0517 | int32_t | Read + Notify
49+
* - Measurement Period 0001 | uint32_t | Read + Write
50+
*
51+
* Button service 0600
52+
* - Button Data 0601 | uint16_t | Read + Notify | e.g (Slide sw, Left, Right)
53+
* - Measurement Period 0001 | uint32_t | Read + Write
54+
*
55+
* PIN I/O service 0700
56+
* - Pin Dir 0701 | uint64_t | Read + Write | bit 1 is In, 0 is Out
57+
* - Pin Data 0702 | uint64_t | Read + Write |
58+
* - PWM Control 0710 | struct { uint8_t pin, uint16_t value, uint32_t period_ms} | as microbit value is 0-1024 for duty cycle
59+
*
60+
* PIN Analog 0800
61+
* - A0 0810 | uint16_t | Read + Notify
62+
* .........................
63+
* - A7 0817 | uint16_t | Read + Notify
64+
* - Measurement Period 0001 | uint32_t | Read + Write
65+
*
66+
* Neopixel Service 0900
67+
* - Pixel Pin 0901 | uint8_t | Read + Write
68+
* - Pixel Count 0902 | uint16_t | Read + Write
69+
* - Pixel Type 0903 | uint16_t | Read + Write | NEO_RGB, NEO_GRB etc ..
70+
* - Pixel Data 0904 | RGB array| Write
3171
*/
32-
BLEAdafruitTemperature bleTemp;
3372

3473
/* Adafruit NeoPixel Service
35-
* - Service: ADAF-0002-C332-42A8-93BD-25E905756CB8
36-
* - Count : ADAF-0003-C332-42A8-93BD-25E905756CB8
37-
* - Type : ADAF-0004-C332-42A8-93BD-25E905756CB8
38-
* - Data : ADAF-0005-C332-42A8-93BD-25E905756CB8
74+
* - Service: ADAF0002-C332-42A8-93BD-25E905756CB8
75+
* - Count : ADAF0003-C332-42A8-93BD-25E905756CB8
76+
* - Type : ADAF0004-C332-42A8-93BD-25E905756CB8
77+
* - Data : ADAF0005-C332-42A8-93BD-25E905756CB8
3978
*/
40-
BLEAdafruitNeopixel bleNeopixel;
4179

4280
/* Adafruit Accelerometer Service
4381
* using micro:bit Accelerometer Service definition
@@ -47,7 +85,12 @@ BLEAdafruitNeopixel bleNeopixel;
4785
* - Data : E95D-CA4B-251D-470A-A062-FA1922DFA9A8
4886
* - Period : E95D-FB24-251D-470A-A062-FA1922DFA9A8
4987
*/
88+
89+
BLEAdafruitTemperature bleTemp;
90+
BLEAdafruitNeopixel bleNeopixel;
5091
BLEAdafruitAccel bleAccel;
92+
93+
5194

5295
void setup()
5396
{

0 commit comments

Comments
 (0)