Edge Impulse: Data forwarder

The Edge Impulse data forwarder sample demonstrates the usage of Edge Impulse’s data forwarder to provide sensor data to Edge Impulse studio when Edge Impulse integration. The sample forwards simulated accelerometer data generated by the Simulated sensor driver.


The sample supports the following development kits:

Hardware platforms


Board name

Build target

nRF9160 DK




nRF5340 DK



nrf5340dk_nrf5340_cpuapp_ns nrf5340dk_nrf5340_cpuapp

nRF52 DK




nRF52840 DK




When built for an _ns build target, the sample is configured to compile and run as a non-secure application with Cortex-M Security Extensions enabled. Therefore, it automatically includes Trusted Firmware-M that prepares the required peripherals and secure services to be available for the application.


The sample periodically performs the following operations:

  • Reads data from sensor. The sample reads simulated acceleration measurements for X, Y, and Z axes.

  • Forwards the data through UART using the protocol specified by Edge Impulse’s data forwarder.


The sample uses UART only to forward the sensor data. For this reason, sample logs are provided through RTT, unlike in other samples.

See Edge Impulse website for more information about the Edge Impulse platform.


See Configuring your application for information about how to permanently or temporarily change the configuration.


Before running the sample, you must complete the following steps:

  1. Prepare your own project using Edge Impulse studio external web tool. See Edge Impulse integration for more information about starting using the tool.

  2. Follow the Edge Impulse CLI installation guide to install Edge Impulse command line tools. These tools are needed because the edge-impulse-data-forwarder is used to forward the data received from the device through UART to Edge Impulse studio.

Building and running

This sample can be found under samples/edge_impulse/data_forwarder in the nRF Connect SDK folder structure.

When built as firmware image for the _ns build target, the sample has Cortex-M Security Extensions (CMSE) enabled and separates the firmware between Non-Secure Processing Environment (NSPE) and Secure Processing Environment (SPE). Because of this, it automatically includes the Trusted Firmware-M (TF-M). To read more about CMSE, see Processing environments.

To build the sample with Visual Studio Code, follow the steps listed on the How to build an application page in the nRF Connect for VS Code extension documentation. See Building and programming an application for other building and programming scenarios and Testing and debugging an application for general information about testing and debugging in the nRF Connect SDK.


After programming the sample to your development kit, test it by performing the following steps:

  1. Run the edge-impulse-data-forwarder Edge Impulse command line tool. The tool connects the device to your Edge Impulse project. See Edge Impulse’s data forwarder documentation for a guide.

  2. Trigger sampling data from the device using Edge Impulse studio:

    1. Go to the Data acquisition tab.

    2. In the Record new data panel, set the desired values and click Start sampling.

      Sampling under Data acquisition in Edge Impulse studio

      Sampling under Data acquisition in Edge Impulse studio

    3. Observe the received sample data on the raw data graph under the panel. For the default sample configuration, you should observe sine waves.

      Sampling example

      Sampling example


This sample uses the following nRF Connect SDK drivers:

In addition, it uses the following Zephyr drivers:

The sample also uses the following secure firmware component: