Description

The PedometerStream command is used to enable or disable the streaming of the pedometer data. The pedometer data includes step count, real-time cadence (steps per minute), real-time heading (direction of walking) in degrees with one decimal fractional digit precision, e.g., 1047 represents 104.7 degrees, alongside the stairs up count and stairs down count. For the stairs counting to work, the barometric pressure sensor must be present on the device. The pedometer is configured to detect human steps, while walking or running. It is also applicable to cycling. The pedometer on Neblina is built based on the assumption that the device is attached or strapped to the front of the leg above the knee or all the way up to the top of the thigh. It is recommended that the device is attached closer to the knee rather than the top of the thigh for better accuracy. Furthermore, the device should be attached to the front of the leg, and not attached to the side or back of the leg. We can alternatively put Neblina in a front pocket and still track steps with a high accuracy.

Protocol

This command uses the Command-Ack-Response-Data protocol.

Command

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x41 ( 0b010 / 0b00001 )
1 Payload Length uint8_t 1
2 CRC uint8_t Calculated
3 Command uint8_t 0x0A

Payload

Byte Name C Type Value
4 State uint8_t 0x00 (Disable) or 0x01 (Enable)

Response

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x01 ( 0b000 / 0b00001 )
1 Payload Length uint8_t 4
2 CRC uint8_t Calculated
3 Command uint8_t 0x0A

Payload

Byte Name C Type Value
4 - 5 Downsample uint16_t Varies
6 - 7 Rate uint16_t Varies

Data

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x61 ( 0b011 / 0b00001 )
1 Payload Length uint8_t 13
2 CRC uint8_t Calculated
3 Command uint8_t 0x0A

Payload

Byte Name C Type Value
4 - 7 Timestamp uint32_t Varies
8 - 9 Step Count uint16_t Varies
10 Cadence uint8_t Varies
11 - 12 Walking Direction uint16_t Varies
13 - 14 Stairs Up Count uint16_t Varies
15 - 16 Stairs Down Count uint16_t Varies