2021-10-17 06:34:24 +00:00
|
|
|
# Motion Service
|
2022-08-21 11:50:09 +00:00
|
|
|
|
2021-10-17 06:34:24 +00:00
|
|
|
## Introduction
|
2022-08-21 11:50:09 +00:00
|
|
|
|
2021-10-17 06:34:24 +00:00
|
|
|
The motion service exposes step count and raw X/Y/Z motion value as READ and NOTIFY characteristics.
|
|
|
|
|
|
|
|
## Service
|
2022-08-21 11:50:09 +00:00
|
|
|
|
2021-11-15 19:41:32 +00:00
|
|
|
The service UUID is **00030000-78fc-48fe-8e23-433b3a1942d0**
|
2021-10-17 06:34:24 +00:00
|
|
|
|
|
|
|
## Characteristics
|
2022-08-21 11:50:09 +00:00
|
|
|
|
2021-11-15 19:41:32 +00:00
|
|
|
### Step count (UUID 00030001-78fc-48fe-8e23-433b3a1942d0)
|
2022-08-21 11:50:09 +00:00
|
|
|
|
2021-10-17 06:34:24 +00:00
|
|
|
The current number of steps represented as a single `uint32_t` (4 bytes) value.
|
|
|
|
|
2021-11-15 19:41:32 +00:00
|
|
|
### Raw motion values (UUID 00030002-78fc-48fe-8e23-433b3a1942d0)
|
2022-08-21 11:50:09 +00:00
|
|
|
|
2021-10-17 06:34:24 +00:00
|
|
|
The current raw motion values. This is a 3 `int16_t` array:
|
|
|
|
|
2022-08-21 11:50:09 +00:00
|
|
|
- [0] : X
|
|
|
|
- [1] : Y
|
|
|
|
- [2] : Z
|
2024-02-11 19:46:26 +00:00
|
|
|
|
|
|
|
The three motion values are in units of "binary milli-g", where 1g is represented by a value of 1024.
|