https://github.com/edgeimpulse/example-standalone-inferencing-pico
Builds and runs an exported impulse locally (Raspberry Pi Pico/RP2040)
https://github.com/edgeimpulse/example-standalone-inferencing-pico
Last synced: 5 months ago
JSON representation
Builds and runs an exported impulse locally (Raspberry Pi Pico/RP2040)
- Host: GitHub
- URL: https://github.com/edgeimpulse/example-standalone-inferencing-pico
- Owner: edgeimpulse
- License: bsd-3-clause-clear
- Created: 2021-06-29T18:01:47.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-10T10:01:55.000Z (over 1 year ago)
- Last Synced: 2025-03-07T00:58:40.772Z (over 1 year ago)
- Language: CMake
- Homepage:
- Size: 2.08 MB
- Stars: 6
- Watchers: 15
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Edge Impulse Example: stand-alone inferencing (Raspberry Pi Pico)
This repository runs an exported impulse on the Raspberry Pi Pico / RP2040. See the documentation at [Running your impulse locally](https://docs.edgeimpulse.com/docs/running-your-impulse-locally-1). This repository is based off of the [Arducam Pico4ML Magic Wand Example](https://github.com/ArduCAM/Pico4ML-Magic-Wand/).
## Requirements
### Hardware
* [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/).
### Software
* [Edge Impulse CLI](https://docs.edgeimpulse.com/docs/cli-installation).
* [GNU ARM Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads).
* [CMake](https://cmake.org/install/).
* Rasperry Pi Pico SDK:
```bash
git clone -b master https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git submodule update --init
export PATH=""
```
## Building the application
### Get the Edge Impulse SDK
Unzip the deployed `C++ library` from your Edge Impulse project and copy to the source directory of this repository:
```
example-standalone-inferencing-pico/
├─ source
├─- model-parameters
├─- edge-impulse-sdk
├─- tflite-model
├─- CMakeLists.txt
├─ .gitignore
├─ LICENSE
├─ README.md
└─ pico_sdk_import.cmake
```
### Compile
1. Create the `build` folder:
```bash
mkdir build && cd build
```
1. Compile:
```bash
cmake ..
clear && make -j4
```
### Flash
Connect the Raspberry Pi Pico to your computer using a micro-USB cable while pressing and holding the **BOOTSEL** button.
Drag and drop the `build/pico_standalone.uf2` file to the **RPI-RP2** disk in your file explorer.
### Serial connection
Use screen, minicom or Serial monitor in Arduino IDE to set up a serial connection over USB. The following UART settings are used: 115200 baud, 8N1.