Note: Your credentials are never stored. When you log in these are exchanged for a token. This token is used to further authenticate requests.
Clearing configuration
To clear the configuration, run:Overriding the frequency
To override the frequency, use:Overriding the baud rate
To set a different baud rate, use:Protocol
The protocol is very simple. The device should send data on baud rate 115,200 with one line per reading, and individual sensor data should be split with either a,
or a TAB
. For example, this is data from a 3-axis accelerometer:
Example (Arduino)
This is an example of a sketch that reads data from an accelerometer (tested on the Arduino Nano 33 BLE):Example (Mbed OS)
This is an example of an Mbed OS application that reads data from an accelerometer (tested on the ST IoT Discovery Kit):Example (Zephyr)
This is an example of a Zephyr application that reads data from an accelerometer (tested on the Nordic Semiconductor nRF52840 DK with ST X-NUCLEO-IKS02A1 shield), based on the sensorhub example:Sensor fusion
Using the Data Forwarder, you can relay data from multiple sensors. You can check Benjamin Cabe’s artificial nose for a complete example using NO2, CO, C2H5OH and VOC sensors on a WIO Terminal. You may also have sensors with different sampling frequencies, such as:- accelerometer: 3 axis sampled at 100Hz
- RMS current sensor: 1 axis sampled at 5Hz
Classifying data
To classify data you first deploy your project by following the steps in Deployments tutorials - which contains examples for a wide variety of platforms. Then, declare afeatures
array, fill it with sensor data, and run the classifier. Here are examples for Arduino, Mbed and Zephyr - but the same applies to any other platform.
Note: These examples collect a full frame of data, then classify this data. This might not be what you want (as classification blocks the collection thread). See Continuous audio sampling for an example on how to implement continuous classification.
Classifying data (Arduino)
Classifying data (Mbed OS)
Classifying (Zephyr)
Before adding the classifier in Zephyr:- Copy the extracted C++ library into your Zephyr project, and add the following to your
CMakeLists.txt
file (where./model
is where you extracted the library).
- Enable C++ and set the stack size of the main thread to at least 4K, by adding the following to
prj.conf
:
- If you’re on a Cortex-M target, enable hardware acceleration by adding the following defines to your
CMakeLists.txt
file: