@@ -22,22 +22,60 @@ BLEDis bledis; // device information
22
22
BLEUart bleuart; // uart over ble
23
23
BLEBas blebas; // battery
24
24
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
31
71
*/
32
- BLEAdafruitTemperature bleTemp;
33
72
34
73
/* 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
39
78
*/
40
- BLEAdafruitNeopixel bleNeopixel;
41
79
42
80
/* Adafruit Accelerometer Service
43
81
* using micro:bit Accelerometer Service definition
@@ -47,7 +85,12 @@ BLEAdafruitNeopixel bleNeopixel;
47
85
* - Data : E95D-CA4B-251D-470A-A062-FA1922DFA9A8
48
86
* - Period : E95D-FB24-251D-470A-A062-FA1922DFA9A8
49
87
*/
88
+
89
+ BLEAdafruitTemperature bleTemp;
90
+ BLEAdafruitNeopixel bleNeopixel;
50
91
BLEAdafruitAccel bleAccel;
92
+
93
+
51
94
52
95
void setup ()
53
96
{
0 commit comments