
Raspberry Pi 4
Prerequisites
Headless Setup
You can set up your Raspberry Pi without a screen. To do so:- Flash the Raspberry Pi OS image to an SD card using the Raspberry Pi Imager.
You must use 64-bit OS with _aarch64 and 32-bit OS with armv7l_*
- During the flashing process, access the advanced options menu in the Raspberry Pi Imager to preconfigure your WiFi and enable SSH.
- wpa_supplicant.conf cannot be used from Bookworm onward. You must use the Pi Imager or the advanced menu
raspi-config
tool to set up WiFi.
- Insert the SD card into your Raspberry Pi 4, and let the device boot up.
-
Find the IP address of your Raspberry Pi. You can either do this through the DHCP logs in your router or by scanning your network. E.g., on macOS and Linux via:
Here
192.168.1.19
is your IP address. -
Connect to the Raspberry Pi over SSH. Open a terminal window and run:
-
Log in with the default username
pi
and passwordraspberry
.
Setup with a Screen
If you have a screen and a keyboard/mouse attached to your Raspberry Pi:- Flash the Raspberry Pi OS image to an SD card.
- Insert the SD card into your Raspberry Pi 4, and let the device boot up.
- Connect to your WiFi network.
- Click the ‘Terminal’ icon in the top bar of the Raspberry Pi.
Installing dependencies
To set this device up in Edge Impulse, run the following commands:Important: Edge Impulse requires Node.js version 20.x or later. Using older versions may lead to installation issues or runtime errors. Please ensure you have the correct version installed before proceeding with the setup.
Install with Docker
If you want to install Edge Impulse on your Raspberry Pi using Docker you can run the following commands: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), and run:--clean
.
Verifying that your device is connected
That’s all! Your device is now connected to Edge Impulse. To verify this, go to your Edge Impulse project, and click Devices. The device will be listed here.
Device connected to Edge Impulse.
Next steps: building a machine learning model
With everything set up you can now build your first machine learning model with these tutorials:- Keyword spotting
- Sound recognition
- Image classification
- object detection.
- Object detection with centroids (FOMO)
Deploying back to device
To run your impulse locally, just connect to your Raspberry Pi again, and run:Image model?
If you have an image model then you can get a peek of what your device sees by being on the same network as your device, and finding the ‘Want to see a feed of the camera and live classification in your browser’ message in the console. Open the URL in a browser and both the camera feed and the classification are shown:
Live feed with classification results
Troubleshooting
Wrong OS bits
If you see the following error when trying to deploy a .eim model to your Raspberry Pi:aarch64
when you run uname -m
.