Introduction to Format of WICED Sensor Data

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Introduction to Format of WICED Sensor Data

The following STMicro Sensors are used:

Please refer to the STMicro Web site for details on Sensor Data Sheets.

pastedImage_9.png

The iOS App receives notifications in this format:

OTA_Sensor_Packets.JPG

struct
{
/// Bit mask of sensor data
/// Bit 0: When set, accelerometer included X (2 signed bytes), Y (2 signed bytes) and Z (2 signed bytes).
/// Bit 1: When set, gyro included X (2 signed bytes), Y (2 signed bytes) and Z (2 signed bytes).
/// Bit 2: When set, humidity included (2 unsigned bytes in percentage).
/// Bit 3: When set, magnetometer included X (2 signed bytes), Y (2 signed bytes) and Z (2 signed bytes).
/// Bit 4: When set, pressure included (2 bytes, pressure in mBar * 10)
/// Bit 5: When set, temperature included (2 unsigned bytes, temperature in C * 10).
UINT8    included_sensor_data;
/// sensor data.
/// Data included in the order of the bits set.
/// Max length is 20 bytes, may be smaller when data for only some sensors is included
///        in the notification.
/// Notifications sent out when enabled
/// Notifications for Sensor Notification characteristic value (handle 0x2A)
UINT8    sensor_data[];
};
0 Likes
0 Replies