dm00249213

DT0047
Design tip
How to install and run the osxMotionAR Activity Recognition
library
By Raffaele Riva
Main components
osxMotionAR
Real-time Activity Recognition software expansion for
STM32Cube
X-NUCLEO-IKS01A1
Motion MEMS and environmental sensor expansion board
for STM32 Nucleo
STEVAL-MKI160V1
LSM6DS3 adapter board for a standard DIL24 socket
NUCLEO-F401RE
STM32 Nucleo-64 development board with
STM32F401RET6 MCU, supports Arduino and ST morpho
connectivity
How to install the osxMotionAR Activity Recognition SW library
The osxMotionAR is an add-on software package for X-CUBE-MEMS1. The software runs
on STM32 MCU and includes drivers that recognize the ST inertial sensors, LSM6DS0 and
LSM6DS3. It provides real-time information on user activity (stationary, walking, fast
walking, jogging, biking and driving).
The following steps are necessary to correctly install the osxMotionAR Activity Recognition
library on the NUCLEO-F401RE evaluation board:
1. Plug the X-NUCLEO-IKS01A1 expansion board into the Nucleo-F401
board (if the STEVAL-MKI160V1 board is available, plug it into the XNUCLEO-IKS01A1 expansion board).
2. Connect the Nucleo-F401 board to the PC through a mini-USB cable.
Drivers will be automatically installed.
3. If the X-CUBE-MEMS1 package is already installed on the PC to go
step 4, if not
 Download the X-CUBE-MEMS1 package from st.com
 Unzip the file (suggested location: “C:\Program Files
(x86)\STMicroelectronics\OpenSoftwareX”).
4. Download and install the package, osxMotionAR from st.com. Note:
the default installation will create a folder named “Workspace” in the
folder “C:\Program Files (x86)\STMicroelectronics\OpenSoftwareX”
This will also install the OSX LIcenseWizard. Note: the default
December 2015
DT0047 Rev 1
1/4
www.st.com
installation will create a folder names “OSX LicenseWizard” in the
folder “C:\Program Files (x86)\STMicroelectronics\OpenSoftwareX”
5. From the osxMotionAR package, copy the folder
STM32_OSX_MotionAR_Library (in “\Middlewares\ST”) into the XCUBE-MEMS1 package in the folder “\Middlewares\ST”. Note: if the
path “\Middlewares\ST” is not present in the X-CUBE-MEMS1, create
it.
6. From the osxMotionAR package, copy the folder DataLogActivity (in
“Projects\STM32F4xx-Nucleo\Applications”) into the X-CUBE-MEMS1
package in the folder “Projects\Multi\Examples”.
7. Open the OSX LicenseWizard:
 Select “MotionAR” library in the “Select the library to be
activated…” button.
 Click on “Identify STM32 Nucleo board”.
 Generate a license request.
 Send the license request. An automatic mail will be sent from
[email protected] with a node-locked license number.
8. To compile the application example there are available three different
IDEs: IAR Embedded Workbench, KEIL, and System Workbench for
STM32. Taking as a reference IAR, open the project DataLogActivity
in the folder “Projects\Multi\Examples\DataLogActivity\EWARM”
 Copy and paste the license number obtained in step 7 into the
file osx_license.h in the folder
“\Middlewares\ST\STM32_OSX_MotionAR_Library”
 Compile the project and download into the target NucleoF401RE board.
How to run the Activity Recognition demo
The steps in table below are necessary to run the reference example demo embedding the
osxMotionAR library.
NOTE 1: PC GUI is the executable “Sensors_DataLog.exe” located in the X-CUBE-MEMS1
package in the folder “\Utilities\PC_software\Sensors_DataLog”
NOTE 2: If connected to a PC with a mini-B USB cable, then steps 2 and 3 have to be
done without the PC GUI open.
Step
1) Power on the board
2) Run the algorithm
3) Stop the algorithm
December 2015
What to do
Connect to Nucleo board:
a. either the external battery and
close the jumper JP1 on the
Nucleo board
b. or the mini-B USB cable to
PC
Press the B1 button
Press the B1 button a second time
DT0047 Rev 1
Output
LD3 ON
LD2 blinking fast
LD2 blinking with code as
in Table2 “LED LD2
activity codes” in UM1936
2/4
www.st.com
4) Connect to the PC
GUI application
a. If battery is connected,
disconnect battery and plug
Nucleo board into PC with a
mini-B USB cable and then
start the application
b. Start the application
Press “Upload AR” button in the GUI
Press button “Save AR” in the GUI
5) Collect data
6) Save data log
the “Upload AR” button is
enabled in the GUI
Data shown in the PC GUI
.cvs file saved in the folder
“\Utilities\PC_software\Sen
sors_DataLog\SensorsDat
aLog”
Support material
Related design support material
Product Evaluation boards:
X-NUCLEO-IKS01A1
STEVAL-MKI160V1
NUCLEO-F401RE
Development kits:
osxMotionAR: Real-time Activity Recognition software expansion for STM32Cube
X-CUBE-MEMS1
Documentation
Data brief:
DB2613: Real-time activity-recognition software expansion for STM32Cube
User manual:
UM1936: Getting started with osxMotionAR activity recognition library for X-CUBE-MEMS1
expansion for STM32Cube
Revision history
Date
04-Dec-2015
December 2015
Version
1
Changes
Initial release
DT0047 Rev 1
3/4
www.st.com
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements,
modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should
obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and
conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for
application assistance or the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for
such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2014 STMicroelectronics – All rights reserved
December 2015
DT0047 Rev 1
4/4
www.st.com