Describing Output Data — SensiML Documentation

Description Output Format

Describing how your output data will arrive at the Data Studio is done using a simple JSON format. This lays out the sample rate and column order of data that will be streaming from a device.

An example of JSON data for the Arduino Nano 33 configured for IMU streaming is shown below:

{ "sample_rate":476, "version":1, "samples_per_packet":6, "column_location":{ "AccelerometerX":0, "AccelerometerY":1, "AccelerometerZ":2, "GyroscopeX":3, "GyroscopeY":4, "GyroscopeZ":5 } }

Version

The version should be either 1 or 2. Version 2 supports a sync protocol with a simple CRC for data integrity. If no version is supplied, the Data Studio will assume version 1.

Sample Rate

Sample rate is the first item defined. Currently, this specification supports one sample rate at a time. Sensors that run slower, but are included in this list, are expected to be over-sampled to match the highest sample rate.

Samples Per Packet

Samples per packet is used to tell the Data Studio how much data will be received in a given packet. The default used by the Data Studio is 6.

Note

The “samples” in “samples_per_packet” refers to a single row of data, where a row contains all of the columns referenced in the column location field of the JSON decription. In the example up above, 10 samples of data for a device outputting 6 columns of sensor data would contain all of the following data:

  1. -10, -8,-2, 1003, 1020, 1300

  2. -10, -8,-2, 1003, 1020, 1300

  3. -10, -8,-2, 1003, 1020, 1300

  4. -10, -8,-2, 1003, 1020, 1300

  5. -10, -8,-2, 1003, 1020, 1300

  6. -10, -8,-2, 1003, 1020, 1300

  7. -10, -8,-2, 1003, 1020, 1300

  8. -10, -8,-2, 1003, 1020, 1300

  9. -10, -8,-2, 1003, 1020, 1300

  10. -10, -8,-2, 1003, 1020, 1300

Column Location

Column Location describes both the name of the given sensor column and its location in the output data stream. With the above description, we can expect 6-axis IMU data. The Data Studio will assume the column locations are matched to this dictionary description. If they are mismatched, it could lead to incorrect data being represented in a model.

Tag » Arduino Nano 33 Ble Imu Sample Rate