Giter VIP home page Giter VIP logo

bluenrg-inference-test's Introduction

Running an impulse on your BlueTile

This example runs an impulse on the STEVAL-BCN002V1 multi-sensor board, classifying data in real-time from the LSM6DSO IMU. An example Edge Impulse project can be found here: https://studio.edgeimpulse.com/public/48988/latest - you can clone this project and use the data forwarder to add new data, or train new gestures.

Note: This is an example, and not a fully supported development board.

Update/replace the existing Edge Impulse library

Note: This inference test repo only utilizes the accelerometer (LSM6DSO) sensor onboard the STEVAL-BCN002V1, to create an inference application using one of the other sensors, you will need to add the driver code from the STSW-BLUETILE-DK SDK into the mbed-os target folder and update the sensor init code in main.cpp.

To update the existing Edge Impulse continuous motion recognition library in this repository with a new accelerometer Edge Impulse C++ library deployment, follow these instructions:

  1. Delete the following directories: edge-impulse-sdk, model-parameters, tflite-model
  2. Extract the .zip file of your new Edge Impulse C++ library and copy/paste the following directories into the root of this project: edge-impulse-sdk, model-parameters, tflite-model
  3. Change the following code in edge-impulse-sdk/porting/mbed/ei_classifier_porting.cpp from:
    /**
     * Cancelable sleep, can be triggered with signal from other thread
     */
    EI_WEAK_FN EI_IMPULSE_ERROR ei_sleep(int32_t time_ms) {
    #if MBED_VERSION >= MBED_ENCODE_VERSION((5), (11), (0))
        rtos::ThisThread::sleep_for(time_ms);
    to...
    /**
     * Cancelable sleep, can be triggered with signal from other thread
     */
    EI_WEAK_FN EI_IMPULSE_ERROR ei_sleep(int32_t time_ms) {
    #if MBED_VERSION >= MBED_ENCODE_VERSION((5), (11), (0))
        wait_ms(time_ms);

Now you are ready to build and flash your new accelerometer Edge Impulse machine learning application to the STEVAL-BCN002V1!

Building and flashing this application

  1. Install the Mbed CLI.

  2. Install the GNU Arm Embedded Toolchain 7.

  3. Configure the Mbed CLI, and point it to the toolchain:

    $ echo 'ROOT=.' > .mbed
    $ mbed config GCC_ARM_PATH ~/toolchains/gcc-arm-none-eabi-7-2018-q2-update/bin/
    
  4. Build the project:

    $ mbed compile -t GCC_ARM -m STEVAL_IDB008V2 --profile=develop.json
    
  5. Install the STSW-BNRGFLASHER (Windows only).

  6. Open the flash application, and flash ./BUILD/STEVAL_IDB008V2/GCC_ARM-DEVELOP/bluenrg-inference-test.bin to address 0x10040000 and check "Entire Memory".

  7. Open a serial terminal to the device on baud rate 9600 to see the inference results.

Attribution

This work is based on an Mbed OS port for the BlueTile by ntoni92.

bluenrg-inference-test's People

Contributors

janjongboom avatar yennster avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.