Arduino Nano 33 BLE Sense and Edge Impulse

Connecting Arduino Nano 33 BLE Sense with Edge Impulse

With Edge Impulse, you can easily collect sensor data, develop AI models from it, and deploy these back to a microcontroller. The perfect companion for this is the Arduino Nano 33 BLE Sense – not only does it have suitable sensors directly on the board, but it’s also capable of running your AI models.

In this tutorial, learn how to make your Arduino Nano 33 BLE Sense available in Edge Impulse.

Please note: For this tutorial, you need a (free) account with Edge Impulse and an already created project there to connect your Arduino to.

Required Software

To get started with your Arduino Nano 33 BLE Sense in Edge Impulse, you first need to install the following software on your PC / Mac:

  • Node.js v12 or higher
  • Arduino CLI
  • Edge Impulse CLI

But don’t worry, the software is free and usually installed in just a few minutes.

Installing Node.js

Node.js is a JavaScript-based runtime environment that lets you create servers, web apps and command line tools. The software is open source and works across platforms.

To install Node.js, visit the official website and download the current version. Then run the installation and follow the instructions there.

Installing Arduino CLI

The abbreviation CLI stands for Command Line Interface – in this case, it means that with the Arduino CLI you can compile and upload a sketch via the terminal instead of in the Arduino IDE.

To install the Arduino CLI, visit the official Arduino website. Here you have several options: Mac and Linux users can use Homebrew. If you’re using Windows, or prefer to download the required files yourself, you’ll find these under “Latest packages”.

After successful installation, we’ll continue with the Edge Impulse CLI.

Installing Edge Impulse CLI

This Command Line Interface consists of several packages that you need for communication between Arduino and Edge Impulse.

To install, open the terminal and execute the following command:

sudo npm install -g edge-impulse-cli

The installation should be completed in a few minutes. If you encounter any problems, check the notes in the Edge Impulse documentation.

Next, you’ll connect your Arduino Nano 33 BLE Sense to Edge Impulse so you can start collecting sensor data.

Connecting the Arduino to Edge Impulse

This requires a few more steps and some software. However, the connection should be established in just a few minutes.

Preparing the Arduino

Connect your Arduino Nano 33 BLE Sense to your computer via USB. Now press the RESET button twice in quick succession. A yellow LED should now light up continuously, signaling that you can upload the required Edge Impulse firmware.

Installing the Edge Impulse Firmware

Once again, some software is needed for the connection with Edge Impulse. This time not for your computer, but for the Arduino itself. First, download the current firmware here and unzip the file.

Now start one of the following installation files, depending on which operating system (Windows, Mac, Linux) you’re using. Your Arduino must be connected to your computer for this and the LED should be glowing yellow.

  • flash_windows.bat
  • flash-mac.command
  • flash_linux.sh
Installing the Edge Impulse Firmware

When the installation has finished, press the RESET button on your Arduino once more to boot the new firmware.

Completing the Setup

All that’s left now is linking your Arduino to one of your projects in Edge Impulse. To do this, start the wizard in the terminal with the following command:

edge-impulse-daemon

The wizard will guide you through all the steps. Afterwards, check in your Edge Impulse project if the connection is established.

Arduino Nano BLE Sense connected the an Edge Impulse project

And that should be it! Now you can collect data with various sensors of your Arduino and process it into an AI model in Edge Impulse.

Please note: Your Arduino Nano is now basically connected to Edge Impulse and your project there. However, if you use it for something else in the meantime and want to reconnect it to Edge Impulse afterwards, run the command edge-impulse-daemon as described above again. After that, your Arduino will be available in Edge Impulse again.

And one more thing: If you want to link the Arduino to a different project in Edge Impulse, you must first disconnect the existing connection. You do this by executing this command in the terminal:

edge-impulse-daemon --clean

The wizard will then ask for your Edge Impulse username and password. Afterwards, you can select a different project directly in the terminal.

What’s Next?

Now that you’ve linked your Arduino Nano to Edge Impulse, it’s time to collect some data for your AI. In this tutorial, you’ll learn how to collect and store motion data using the built-in motion sensor of the Arduino Nano 33 BLE Sense.

We don't track you. Enjoy your cookies while making awsome electronic projects!