Skip to content

edgeimpulse/firmware-particle

Repository files navigation

Edge Impulse firmware for Particle Photon 2

The Particle Photon 2 is a development module with a microcontroller and Wi-Fi networking. The board itself doesn't include any sensors, but we added examples for both microphone and accelerometer.

Setup the sensors

The firmware is based on following sensors:

The libraries used to control and get data from the sensors are already included in this repository.

How to connect the hardware can be found on our docs page for the Photon 2.

Replacing the ML model

By default the firmware includes the motion recognition model. You can replace this model with a your model deployed in Edge Impulse. Following steps show how you can replace the model:

  1. In Edge Impulse studio, deploy your model as a Particle Library

  2. From this folder remove the folders edge-impulse-sdk, tflite-model and model-parameters

  3. Copy the equally naming folders from the downloaded model into the src folder

  4. Rebuild and flash the firmware to device

Particle Workbench

To build the firmware and upload a binary to the Photon 2, Particle provides the Workbench VsCode extension. Please follow the Particle Workbench guide lines on setting up the tool

Building and flashing firmware

  1. In Workbench, select Particle: Import Project and select the project.properties file in the directory that you just downloaded and extracted.

  2. Use Particle: Configure Project for Device and select [email protected] and choose a target. (e.g. P2 , this option is also used for the Photon 2).

  3. Compile with Particle: Compile application (local)

  4. Flash with Particle: Flash application (local)

At this time you cannot use the Particle: Cloud Compile or Particle: Cloud Flash options; local compilation is required.

Building firmware using Docker

Next to the Workbench extension, this folder contains a Dockerfile that allows building of Particle firmware.

Create Docker image and run container

Build the Docker container:

docker build -t particle-build .

Run the container and build the firmware

docker run --rm -it -v $PWD:/app particle-build /bin/bash -c "./particle-build.sh --build"

Flash binary to device

Flashing your Particle device requires the Particle command line tool. Follow these instructions to install the tools.

Once the tool is installed, following command is used to upload a binary to the device:

particle flash --local target/p2/app.bin

About

Full ingestion and inference for Particle devices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published