Raspberry Pi 5

Raspberry Pi 5

The Raspberry Pi 5 with 2–3× the speed of the previous generation, and featuring silicon designed in‑house for the best possible performance, we’ve redefined the Raspberry Pi experience. The Pi5 is a versatile Linux development board with a quad-core processor running at 2.4GHz a GPIO header to connect sensors, and the ability to easily add an external microphone or camera - and it's fully supported by Edge Impulse. You'll be able to sample raw data, build models, and deploy trained machine learning models directly from the Studio.

In addition to the Raspberry Pi 5 we recommend that you also add a camera and / or a microphone. Most popular USB webcams and the Camera Module work fine on the development board out of the box.

Raspberry Pi 5

Setting Up Your Raspberry Pi 5 with the New Bookworm OS

In this documentation, we will detail the steps to set up your Raspberry Pi 5 with the new Bookworm release OS for Edge Impulse. This guide includes headless setup instructions and how to connect to Edge Impulse, along with troubleshooting tips.

You must use 64-bit OS with _aarch64** and 32-bit OS is not supported**

Raspberry Pi 5 uses aarch64, which is a 64-bit CPU. If you are installing Raspberry Pi OS for the RPi 5, make sure you use the 64-bit version.

1. Connecting to Your Raspberry Pi

Headless Setup

You can set up your Raspberry Pi without a screen. To do so:

  1. Download the Raspberry Pi OS - Bookworm Release

    • Ensure you have the latest Raspberry Pi OS which supports the new Edge Impulse Linux CLI version >= 1.3.0.

  2. Flash the Raspberry Pi OS Image

    • Flash the OS image to an SD card using a tool like Balena Etcher.

  3. Prepare the SD Card

    • After flashing, locate the boot mass-storage device on your computer.

    • Create a new file called wpa_supplicant.conf in the boot drive with the following content:

      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      country=<Insert 2 letter ISO 3166-1 country code here>
      
      network={
        ssid="<Name of your wireless LAN>"
        psk="<Password for your wireless LAN>"
      }

      Replace the placeholders with your WiFi credentials.

    • Create an empty file called ssh in the boot drive to enable SSH.

  4. Boot the Raspberry Pi

    • Insert the SD card into your Raspberry Pi 5 and power it on.

  5. Find the IP Address

    • Locate the IP address of your Raspberry Pi using your router's DHCP logs or a network scanning tool. On macOS or Linux, use:

      arp -na | grep -i dc:a6:32

      This will display the IP address, e.g., 192.168.1.19.

  6. Connect via SSH

    • Open a terminal and connect to the Raspberry Pi:

      ssh pi@192.168.1.19
    • Log in with the default password raspberry.

With a Screen

If you have a screen and a keyboard/mouse attached to your Raspberry Pi:

  1. Flash the Raspberry Pi OS Image

    • Flash the OS image to an SD card as described above.

  2. Boot the Raspberry Pi

    • Insert the SD card into your Raspberry Pi 5 and power it on.

  3. Connect to WiFi

    • Use the graphical interface to connect to your WiFi network.

  4. Open a Terminal

    • Click the 'Terminal' icon in the top bar of the Raspberry Pi desktop.

2. Installing Dependencies

To set this device up in Edge Impulse, run the following commands:

sudo apt update
curl -sL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y gcc g++ make build-essential nodejs sox gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps
sudo npm install edge-impulse-linux -g --unsafe-perm

Then to update npm packages:

sudo npm install -g npm@10.8.1

If you have a Raspberry Pi Camera Module, you also need to activate it first. Run the following command:

sudo raspi-config

Use the cursor keys to select and open Interfacing Options, then select Camera, and follow the prompt to enable the camera. Reboot the Raspberry Pi.

Install with Docker

If you want to install Edge Impulse on your Raspberry Pi using Docker, run the following commands:

sudo apt update
sudo apt install -y docker.io
sudo systemctl enable docker
sudo systemctl start docker
sudo docker run -it --rm --privileged --network=host -v /dev/:/dev/ --env UDEV=1 --device /dev:/dev --entrypoint /bin/bash ubuntu:20.04

Once in the Docker container, run:

apt-get update

apt-get install wget -y
wget https://deb.nodesource.com/setup_20.x
bash setup_20.x
apt install -y gcc g++ make build-essential nodejs sox gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps vim v4l-utils usbutils udev
apt-get install npm -y
npm config set user root
npm install edge-impulse-linux -g --unsafe-perm

3. Connecting to Edge Impulse

With all software set up, connect your camera or microphone to your Raspberry Pi (see 'Next steps' further on this page if you want to connect a different sensor).

To connect your Raspberry Pi 5 to Edge Impulse, run the following command:


edge-impulse-linux

You can now sample raw data, build models, and deploy trained machine learning models directly from the Studio. Please let us know if you have any questions or need further assistance. forum.edgeimpulse.com

Troubleshooting

Wrong OS bits

If you see the following error when trying to deploy a .eim model to your Raspberry Pi:

Failed to run impulse Error: Unsupported architecture “aarch64”

It likely means you are attempting to deploy a .eim Edge Impulse model file to a 32-bit operating system running on a 64-bit CPU. To check your hardware architecture and OS in Linux, please run the following commands:

uname -m
uname -a
getconf LONG_BIT

Last updated

Revision created

push