Skip to main content

7th release of Edge Impulse Project

Major VersionM

by Brennah

    • This tutorial is a guide on how to install the software and set up the hardware to run a machine learning model on an Arduino Nano 33 BLE.

    • Edge Impulse is an easy way to experiment with machine learning and understand responsible AI usage.

    • Once you have completed all of these steps, you will be familiar with the software needed to run Edge Impulse CLI and how to connect your Arduino to Edge Impulse.

    • WARNING: The Arduino microcontroller is susceptible to damage if it interacts with static electricity. Please be cautious as to not let it come in contact with highly static items, especially during winter months.

  1. Go to this website to get started: https://docs.edgeimpulse.com/docs/ Scroll Down in the left-hand scroll bar until "Development Platforms" is listed. Click the page in the RED box.''
    • Go to this website to get started: https://docs.edgeimpulse.com/docs/

    • Scroll Down in the left-hand scroll bar until "Development Platforms" is listed. Click the page in the RED box.''

    • Locate "Officially Supported MCU targets" and select the drop-down menu for you to select your board. In this tutorial, we are using Arduino Nano 33 BLE, so select what is in the ORANGE box.

    • To check the type of board you are using, find your piece of hardware and flip it over so the pins are facing upwards as seen in the second image. There you will find your label.

  2. Once you are on the Arduino Nano page, scroll down  on this page until you find "Installing Dependencies." To begin, select what's in the RED box. Once this page is open (listed as Installation), scroll down to the type of operating system your device uses. This tutorial will be running on Windows. If you haven't done so already, create an Edge Impulse account following the link: https://studio.edgeimpulse.com/signup
    • Once you are on the Arduino Nano page, scroll down on this page until you find "Installing Dependencies." To begin, select what's in the RED box.

    • Once this page is open (listed as Installation), scroll down to the type of operating system your device uses. This tutorial will be running on Windows.

    • If you haven't done so already, create an Edge Impulse account following the link: https://studio.edgeimpulse.com/signup

  3. Python 3.11 is needed because its easy-use and data manipulation allows users the ability to deploy and build AI models. To begin installation, click the link in the RED box or here: https://www.python.org/ You will be taken to Python's main page. Look for "Downloads" in the ORANGE box.
    • Python 3.11 is needed because its easy-use and data manipulation allows users the ability to deploy and build AI models.

    • To begin installation, click the link in the RED box or here: https://www.python.org/

    • You will be taken to Python's main page. Look for "Downloads" in the ORANGE box.

    • If you hover over Downloads, a drop-down menu will appear. Click on " Python 3.11.3" which will lead to an automatic download that will appear in your "File Explorer."

    • Make sure you download 3.7 or higher.

    • Open Python after it created a file. When prompted, select "Add to Path."

    • Suggestion: Create a Folder in your File Explorer where you can move all files and downloads. This will make it easier to locate when you have multiple downloads.

  4. To Download Visual Studios, go to: https://visualstudio.microsoft.com/downl... In Visual Studio, click "Free Download" under Community  in the ORANGE box.
    • To Download Visual Studios, go to: https://visualstudio.microsoft.com/downl...

    • In Visual Studio, click "Free Download" under Community in the ORANGE box.

    • It will open a customizable download box. In order for it to be compatible with Edge Impulse , select the box in RED called "Desktop Development for C++".

    • Once selected, don't adjust other selections and then hit "Install."

    • NOTE: This is a heavier installation so make sure you have space on your device.

    • Move download to your designated folder and MAKE SURE you reboot your computer once it's done with the installation.

  5. Node.js is helpful in running Edge Impulse because it provides efficient ways to interact with the platform, handle data collection, and deploy models. To begin installation, click the link in the RED box or here: https://nodejs.org/en/ NOTE: It says select v14 or higher, but this site hasn't been updated, so on the Node.js website it will say version 18 or 20.
    • Node.js is helpful in running Edge Impulse because it provides efficient ways to interact with the platform, handle data collection, and deploy models.

    • To begin installation, click the link in the RED box or here: https://nodejs.org/en/

    • NOTE: It says select v14 or higher, but this site hasn't been updated, so on the Node.js website it will say version 18 or 20.

    • Once you click on the website, you will have two options to download. Click the most current version for Windows in the ORANGE box. (second image)

    • When you download Node.js, select the Additional Node.js tools in the RED box. (Third image)

    • Once you select "Finish", it will take you to Command Prompt box. Click any key until you are taken to Administrator Powershell where it will confirm all of your downloads.

    • NOTE: If you get errors about Python not being updated, continue. You'll be prompted later.

    • Move download to your designated folder.

  6. Chocolatey is a software tool that provides a way for other softwares to be easily managed and updated. In your Windows search bar, type in "edit environment variables for your account" in the RED box.
    • Chocolatey is a software tool that provides a way for other softwares to be easily managed and updated.

    • In your Windows search bar, type in "edit environment variables for your account" in the RED box.

    • Once open, search for what is at the end of the ORANGE ARROWS. If you don't have these, redownload Node.js.

  7. Go back to the Arduino Nano 33 BLE main page and scroll down until you see Arduino CLI. Click on the link: https://arduino.github.io/arduino-cli/la... in the RED box. You will be on the main page. In the Arduino CLI tools bar on the left, select "Installation."
    • Go back to the Arduino Nano 33 BLE main page and scroll down until you see Arduino CLI. Click on the link: https://arduino.github.io/arduino-cli/la... in the RED box.

    • You will be on the main page. In the Arduino CLI tools bar on the left, select "Installation."

    • Scroll to "Latest Releases" and select (for Windows) the 64 bit version in the ORANGE box.

    • This will become a zip file that must be extracted. So, in your File Explorer, select "Extract All."

    • Move download to your designated folder.

  8. Scroll down on the main Arduino Nano page https://docs.edgeimpulse.com/docs/develo... and download the Edge Impulse firmware file in the RED box. Once you open the downloaded file in your File Explorer, be sure to right click on it and select "Extract All"
    • Scroll down on the main Arduino Nano page https://docs.edgeimpulse.com/docs/develo... and download the Edge Impulse firmware file in the RED box.

    • Once you open the downloaded file in your File Explorer, be sure to right click on it and select "Extract All"

    • Move download to your designated folder.

    • Next, once you extracted the file, open the file "arduino-cli_0.33.0_Windows_64bit" and move "arduino-cli.exe" to the folder "arduino-nano-33-ble-sense"

  9. Open File Explorer and go to your "arduino-cli_0.33.0_Windows_64bit" in the RED box. Open the file, then go to the title of the file while it's opened. Click to the right of it so the file title is visible. Copy that. Once copied, go to your Environmental Variables and select "PATH" (at the end of the ORANGE ARROW).
    • Open File Explorer and go to your "arduino-cli_0.33.0_Windows_64bit" in the RED box.

    • Open the file, then go to the title of the file while it's opened. Click to the right of it so the file title is visible. Copy that.

    • Once copied, go to your Environmental Variables and select "PATH" (at the end of the ORANGE ARROW).

    • Click "Edit..." (in the YELLOW BOX).

    • Then create a new path (GREEN box). Once created, paste the Arduino file into it, which is shown as highlighted in blue.

  10. Search "Windows PowerShell" in your device's search bar (BLUE box). Right click and select "Run as Administrator" as in the (PURPLE box). Go to the second image. If you can't open by right clicking, select the available PowerShell and type in the statement >> Start-Process PowerShell -Verb RunAs >> which will give you admin permission. Once open, paste this statement in (RED ARROW): Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr -Uri "https://raw.githubusercontent.com/edgeim... -Outfile install.ps1; iex .\install.ps1; del .\install.ps1
    • Search "Windows PowerShell" in your device's search bar (BLUE box). Right click and select "Run as Administrator" as in the (PURPLE box).

    • Go to the second image. If you can't open by right clicking, select the available PowerShell and type in the statement >> Start-Process PowerShell -Verb RunAs >> which will give you admin permission.

    • Once open, paste this statement in (RED ARROW): Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr -Uri "https://raw.githubusercontent.com/edgeim... -Outfile install.ps1; iex .\install.ps1; del .\install.ps1

    • For more information, go to this website: https://github.com/edgeimpulse/ei-instal...

    • If this doesn't load anything initially, try closing out your current PowerShell screen and open a new one and restart back at the RED bullet.

    • If Python didn't download properly, this is where you are prompted to update it.

    • Once Edge Impulse CLI is downloaded properly, you will receive a highlighted statement. (GREEN ARROW)

    • To check, paste in the statement: "npm install -g edge-impulse-cli --force." If you get any errors, please refer to the Edge Impulse Forum: https://forum.edgeimpulse.com/

  11. Grab your Arduino Nano and plug it in to your device using a USB cable (in ORANGE). Once connected, DOUBLE click the Reset button. The orange light will turn on on your microcontroller.
    • Grab your Arduino Nano and plug it in to your device using a USB cable (in ORANGE).

    • Once connected, DOUBLE click the Reset button. The orange light will turn on on your microcontroller.

    • Find your "arduino-nano-33-ble-sense" file (should be in your designated folder) and open the "flash_windows.bat" file. (RED BOX)

    • If prompted to Install device firmware, Install all packages.

    • NOTE: Be sure to not flash your board repeatedly. This leads to a higher risk in errors and is taxing on the device's memory.

    • Once flashing is complete, hit the Reset button ONCE.

  12. Now, we can finally set it up to Edge Impulse! Firstly, go to your Edge Impulse account and select "Log in." Use your login credentials from earlier and sign in. Once you've done so, create a new project and give it a title. Now open a new Command Prompt. In this, type "edge-impulse-daemon." You will then be prompted to give the details of your account on Edge Impulse.  Select the project you want your Arduino connected to using the up and down arrows.
    • Now, we can finally set it up to Edge Impulse!

    • Firstly, go to your Edge Impulse account and select "Log in." Use your login credentials from earlier and sign in. Once you've done so, create a new project and give it a title.

    • Now open a new Command Prompt. In this, type "edge-impulse-daemon." You will then be prompted to give the details of your account on Edge Impulse. Select the project you want your Arduino connected to using the up and down arrows.

    • You will be given a link that must be copy and paste into a Windows browser tab. This will open your project with your device being connected.

    • To check, go to the "Devices" in the left-hand toolbar to check your device is connected.

    • NOTE: If you want to change your project, create a new Command Prompt window and type in "edge-impulse-daemon --clean."

    • Leave Command Prompt open for the duration of the next tutorial until told otherwise. If you close it, you are disconnecting your device from Edge Impulse.

    • You have completed the entire tutorial for installing all of the software to run Edge Impulse on an Arduino Nano 33 BLE. To learn more about creating a machine learning model, go to the following tutorial: Creating a Motion-Activated LED with Edge Impulse and an Arduino Nano 33 BLE

Finish Line

Brennah

Member since: 05/25/2023

2 Guides authored

0 Comments

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 3

Past 30 Days: 13

All Time: 165