Edge Impulse Docs

Edge Impulse Documentation

Welcome to the Edge Impulse documentation. You'll find comprehensive guides and documentation to help you start working with Edge Impulse as quickly as possible, as well as support if you get stuck. Let's jump right in!

On your Eta Compute ECM3532

Impulses can be deployed as a C++ library. This packages all your signal processing blocks, configuration and learning blocks up into a single package. You can include this package in your own application to run the impulse locally. In this tutorial you'll export an impulse, and build an application for the Eta Compute ECM3532 AI Sensor to classify sensor data.


Knowledge required

This tutorial assumes that you're familiar with building applications for the ECM3532 AI Sensor, and have your environment set up to compile applications for this platform. If you're unfamiliar with these tools you can build binaries directly for your development board from the Deployment page in the studio.


Make sure you followed the Continuous motion recognition tutorial, and have a trained impulse. Also install the following software:

You will also need a way to flash your device. Either:

  • If you have the ECM3532 AI Sensor: the SparkFun FTDI Breakout board and the Edge Impulse CLI (instructions).
  • Or, a SEGGER J-LINK Debug probe.

Cloning the base repository

We created an example repository which contains a small application, which takes the raw features as an argument, and prints out the final classification. You can either download the application or import this repository using Git:

$ git clone https://github.com/edgeimpulse/example-standalone-inferencing-ecm3532

Deploying your impulse

Head over to your Edge Impulse project, and go to Deployment. From here you can create the full library which contains the impulse and all external required libraries. Select C++ library and click Build to create the library.

Download the .zip file and place the contents in the 'example-standalone-inferencing-ecm3532' folder (which you downloaded above). Your final folder structure should look like this:

|_ 3rd_party
|_ Makefile
|_ README.md
|_ bin
|_ devices
|_ edge-impulse-sdk
|_ gcc
|_ model-parameters
|_ soc
|_ src
|_ tflite-model
|_ utils

Running the impulse

With the project ready it's time to verify that the application works. Head back to the studio and click on Live classification. Then load a validation sample, and click on a row under 'Detailed result'.

Selecting the row with timestamp '320' under 'Detailed result'.

To verify that the local application classifies the same, we need the raw features for this timestamp. To do so click on the 'Copy to clipboard' button next to 'Raw features'. This will copy the raw values from this validation file, before any signal processing or inferencing happened.

Copying the raw features

In the example directory open src/main.cpp and paste the raw features inside the static const float features[] definition, for example:

static const float features[] = {
    -19.8800, -0.6900, 8.2300, -17.6600, -1.1300, 5.9700, ...

Then build the application by opening a terminal or command prompt, navigating to the 'example-standalone-inferencing-ecm3532' folder and run:

$ make

This generates two binary files in the build/ directory. One that can be flashed on the EC3532 AI Sensor using the FTDI breakout board, and one that can be flash with a J-LINK.

Flashing using the FTDI breakout board


$ eta-flash-tool --firmware-path build/edge_impulse_inferencing_bootloader.bin

Flashing using a J-LINK

Connect your J-LINK to J2 on the AI Sensor (the 10 pins connector directly next to the FTDI header) and flash build/edge_impulse_inferencing.bin to address 0x01000000 using the J-LINK tools (e.g. JFlashLite).

Flashing the binary using JFlashLite

Seeing the output

To see the output of the impulse, connect to the development board over a serial port (instructions for the Eta Compute ECM3532 AI Sensor) on baud rate 115,200.

This will run the signal processing pipeline, and then classify the output:

Edge Impulse standalone inferencing (ECM3532)
Running neural network...
Predictions (time: 2 ms.):
idle:   0.015319
snake:  0.000444
updown: 0.006182
wave:   0.978056
Anomaly score (time: 1 ms.): 0.133557
run_classifier_returned: 0
[0.01532, 0.00044, 0.00618, 0.97806, 0.134]

Which matches the values we just saw in the studio. You now have your impulse running on your ECM3532 development board!

Updated about a month ago

On your Eta Compute ECM3532

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.