Skip to content

edgeimpulse/example-ti-msp432-mcu-motion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TI MSP432™ MCU Motion Recognition Demo with Edge Impulse

This repository contains an example for the TI MSP432™ MCU with Educational BoosterPack MKII for motion recognition with Edge Impulse.

Pre-requisites

Collect accelerometer motion data

Follow the instructions below to record motion data samples from the TI MSP432/Educational BoosterPack accelerometer and upload them directly into your Edge Impulse project.

Alternatively, you can instead use data that has already been collected from the Continuous motion recognition tutorial by cloning the Edge Impulse tutorial project into your account (select the Clone this project button on the top right).

  1. Open the file get_msp432_motion_data/get_msp432_motion_data.ino in your Arduino IDE
  2. Select the RED LaunchPad w/ msp432p401r EMT (48MHz) board and port from the 'Tools' menu
  3. Compile and flash the program onto your board
  4. Open a command line window and run edge-impulse-data-forwarder --frequency 50, select your board and project settings in your Edge Impulse account: Edge Impulse data forwarder
    • Select the Devices tab on your Edge Impulse project dashboard and you should see your TI MSP432 board connected with a green dot Edge Impulse connected devices
  5. Select the Data acquisition tab on your Edge Impulse project dashboard and start collecting motion samples under 'Record new data':
    • I recorded ~13 minutes of training data and ~3 minutes of testing data, with 4 different types of motion classes: updown, wave, snake, and idle Edge Impulse record new data

Create your impulse & classify motion data on the TI MSP432™ MCU

Now that you have gathered and uploaded your motion data samples into your Edge Impulse project, you can create your machine learning Impulse design to train a model to recognize various gestures from the accelerometer data on your device.

If you cloned the existing Edge Impulse Continuous motion recognition tutorial project into your account, the Impulse design step is already done for you, skip to the instructions below.

Otherwise, please follow the Continuous motion recognition tutorial to setup your machine learning Impulse design for your Edge Impulse project and then follow the instructions below.

  1. Select the Deployment tab on your Edge Impulse project, select 'Arduino library' and then click Build
  2. Open ei_msp432_motion_example/ei_msp432_motion_example.ino in your Arduino IDE
  3. Select the RED LaunchPad w/ msp432p401r EMT (48MHz) board and port from the 'Tools' menu
  4. Import your downloaded Arduino library into the Arduino IDE: 'Sketch' > 'Include Library' > 'Add .ZIP Library...' and select your Edge Impulse library then import it into your .ino file (for example, on line 2: #include <tutorial_continuous_motion_recognition_inference.h>)
  5. Modify the getAcceleration() method if you are using the cloned Edge Impulse Continuous motion recognition tutorial project (see comments at line 63)
  6. Compile and flash the program onto your board
    • Note: During compilation, if you get an error relating to 'vsnprintf' was not decalred in this scope, add #include <stdio.h> to the following file in your imported Arduino library, for example: Arduino/libraries/ei-tutorial_-continuous-motion-recognition-arduino-1.0.1/src/edge-impulse-sdk/porting/arduino/ei_classifier_porting.cpp then re-compile and flash
  7. View your TI MSP432's BoosterPack screen displaying the motion inferencing results every 2 seconds! TI MSP432 MCU running Edge Impulse inferencing

Next steps

Now that you have created a machine learning motion recognition project with Edge Impulse and a TI MSP432™ MCU, you can follow the same process to create other machine learning projects with different sensors on the BoosterPack such as the temperature sensor or microphone. Here are a few tutorials you can follow:

Have further questions about Edge Impulse or want to show us the project you created? Make a post on our forum at https://forum.edgeimpulse.com/ or tag us on social media @EdgeImpulse!

About

Example for TI MSP432™ MCU with Educational BoosterPack MKII for motion recognition with Edge Impulse

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages