Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions content/learning-paths/embedded-and-microcontrollers/edge/_index.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
---
title: Learn How to Run AI on Edge Devices- Arduino Nano RP2040

draft: true
cascade:
draft: true
title: Learn how to run AI on Edge devices using Arduino Nano RP2040

minutes_to_complete: 90

who_is_this_for: This learning path is for beginners in Edge AI and TinyML, including developers, engineers, hobbyists, AI/ML enthusiasts, and researchers working with embedded AI and IoT.
who_is_this_for: This Learning Path is for beginners in Edge AI and TinyML, including developers, engineers, hobbyists, AI/ML enthusiasts, and researchers working with embedded AI and IoT.

learning_objectives:
- Understand Edge AI and TinyML basics.
- Collect and preprocess audio data using Edge Impulse.
- Train and deploy an audio classification model on Arduino Nano RP2040.
- Interface with LEDs to switch them on and off.
- Understand the basics of Edge AI and TinyML.
- Collect and preprocess audio data using Edge Impulse.
- Train and deploy an audio classification model on the Arduino Nano RP2040.
- Control LEDs by turning them on and off based on model predictions.

prerequisites:
- Explore this [learning path](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/arduino-pico/) if you are an absolute beginner.
- An [Edge Impulse](https://edgeimpulse.com/) Studio account.
- The [Arduino IDE with the RP2040 board support package](https://learn.arm.com/install-guides/arduino-pico/) installed on your computer
- An Arduino Nano RP2040 Connect [board](https://store.arduino.cc/products/arduino-nano-rp2040-connect-with-headers?_gl=1*9t4cti*_up*MQ..*_ga*NTA1NTQwNzgxLjE3NDYwMjIyODk.*_ga_NEXN8H46L5*MTc0NjAyMjI4Ny4xLjEuMTc0NjAyMjMxOC4wLjAuMjA3MjA2NTUzMA..).
- Completion of this [Learning Path](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/arduino-pico/) if you're an absolute beginner.
- An [Edge Impulse](https://edgeimpulse.com/) Studio account.
- The [Arduino IDE](https://learn.arm.com/install-guides/arduino-pico/) with the RP2040 board support package installed on your computer.
- An [Arduino Nano RP2040 Connect board](https://store.arduino.cc/products/arduino-nano-rp2040-connect-with-headers).


author: Bright Edudzi Gershon Kordorwu
### Tags
Expand All @@ -38,15 +35,15 @@ operatingsystems:

further_reading:
- resource:
title: TinyML Brings AI to Smallest Arm Devices
title: TinyML brings AI to smallest Arm devices
link: https://newsroom.arm.com/blog/tinyml
type: blog
- resource:
title: What is edge AI?
title: What is Edge AI?
link: https://docs.edgeimpulse.com/nordic/concepts/edge-ai/what-is-edge-ai
type: blog
- resource:
title: Edge Impulse for Beginners
title: Edge Impulse for beginners
link: https://docs.edgeimpulse.com/docs/readme/for-beginners
type: doc

Expand Down
Original file line number Diff line number Diff line change
@@ -1,69 +1,72 @@
---
title: Board Connection and IDE setup
title: Board connection and IDE setup
weight: 4

### FIXED, DO NOT MODIFY
layout: learningpathall
---

### Arduino Nano RP2040
## Arduino Nano RP2040

To get started with your first **TinyML project**, the **Arduino Nano RP2040 Connect** is a good option. Built by Arduino, it uses the **RP2040 microcontroller** and is fully supported by the Arduino core package. The board comes with built-in Wi-Fi, Bluetooth, and an onboard IMU—features that is useful for deploying machine learning models at the edge.
To get started with your first **TinyML project**, the **Arduino Nano RP2040 Connect** is a good option. Built by Arduino, it uses the **RP2040 microcontroller** and is fully supported by the Arduino core package.


The board comes with built-in Wi-Fi, Bluetooth, and an onboard IMU. These are features that are useful for deploying machine learning models at the edge.

![example image alt-text#center](images/nano.png "Arduino Nano RP2040")

Its compatibility with popular tools like Edge Impulse and the Arduino IDE makes it a suitable choice for TinyML applications. You can learn more about the Arduino Nano RP2040 Connect on the [official Arduino website](https://store.arduino.cc/products/arduino-nano-rp2040-connect-with-headers?_gl=1*1laabar*_up*MQ..*_ga*MTk1Nzk5OTUwMS4xNzQ2NTc2NTI4*_ga_NEXN8H46L5*czE3NDY1NzY1MjUkbzEkZzEkdDE3NDY1NzY5NTkkajAkbDAkaDE1MDk0MDg0ODc.).

## Put everything together
## Connect and set up the Arduino Nano RP2040 Connect

This guide will help you connect the Arduino Nano RP2040 Connect to your computer and set up the Arduino IDE for programming.

### Step 1: Connect the LED to the Arduino Nano RP2040
## Gather the components

To visualize the output of the voice command model, you will use a simple LED circuit.
To visualize the output of the voice command model, you'll use a simple LED circuit.

### Components Needed
You will need the following components:

- Arduino Nano RP2040 Connect
- 1x LED
- 1x 220Ω resistor
- Arduino Nano RP2040 Connect
- LED
- 1× 220 Ω resistor
- Breadboard and jumper wires

#### Circuit Diagram
## Connect the LED to the Arduino Nano RP2040

- **Anode (long leg) of the LED** → Connect to **GPIO pin D2** via the 220Ω resistor
- **Cathode (short leg)** → Connect to **GND**
- **Anode (long leg) of the LED** → connect to **GPIO pin D2** through a 220 Ω resistor
- **Cathode (short leg)** → connect to **GND**

![example image alt-text#center](images/led_connection.png "Figure 14. Circuit Connection")
![Diagram showing the physical breadboard circuit connecting an LED to GPIO D2 and GND on the Arduino Nano RP2040 alt-text#center](images/led_connection.png)

![example image alt-text#center](images/led_connection_schematic.png "Figure 15. Circuit Schematic Connection")
![Schematic diagram showing the LED connected between GPIO D2 and GND with a 220 Ω resistor in series alt-text#center](images/led_connection_schematic.png)

### Step 2: Set Up the Arduino IDEs
## Set up the Arduino IDE

To program and deploy your trained model to the Arduino Nano RP2040, you first need to configure your development environment.

Follow the detailed setup instructions provided in the [Arduino Nano RP2040 Install Guide](https://learn.arm.com/install-guides/arduino-pico/)
Follow the steps in the [Arduino Nano RP2040 install guide](https://learn.arm.com/install-guides/arduino-pico/).

This guide will walk you through:
This guide walks you through:

- Installing the Arduino IDE
- Installing the Arduino IDE
- Adding the board support package for the Nano RP2040

{{% notice Note %}}
**Note:** Follow every instruction in the guide **except** `How do I set up the Raspberry Pi Pico W?`, as it is not needed for this project.
{{% /notice %}}
{{< notice Note >}}
Follow all steps in the guide except *How do I set up the Raspberry Pi Pico W?*, which is not required for this project.
{{< /notice >}}

### Step 3: Select Your Board and Port in the Arduino IDE
## Select your board and port in the Arduino IDE

First, open the **Arduino IDE**.
Open the Arduino IDE. To select your board:

To select your board:

1. Go to **Tools** > **Board**.
2. From the list, choose **Arduino Nano RP2040 Connect**.
Go to **Tools** > **Board** then select **Arduino Nano RP2040 Connect**

To select your port:

1. Connect your Arduino board to your computer using a USB cable.
2. Go to **Tools** > **Port**.
3. Select the port labeled with your board’s name, e.g., `COM4 (Arduino Nano RP2040 Connect)` or `/dev/cu.usbmodem...` on macOS.
Connect your board to your computer using a USB cable, then follow these steps:

- Go to **Tools** > **Port**
- Select the port labeled with your board's name, such as `COM4 (Arduino Nano RP2040 Connect)` or `/dev/cu.usbmodem...` on macOS.

*Your Arduino IDE is now ready to upload code to the Arduino Nano RP2040.*
Your Arduino IDE is now ready to upload code to the Arduino Nano RP2040.
Loading