The LSM6DSOX is one of the most innovative products in ST MEMS Sensors portfolio. And, of course, is onboard on the ST.box. Two pro-mode application directly shows part of the capability of this product:
- BLELowPower application: besides explaining how to use FreeRTOS and low power techniques to send the data to STBLESensor via Bluetooth, this application shows how to enable the capability of LSM6DSOX accelerometer to detect events like FreeFall, Single/Double Tap, WakeUp, Tilt and 6D orientation, also sending them to STBLESensor.
- BLEMLC application, on the other hand, directly shows how to program the LSM6DSOX machine learning core. In particular, this sample programs the accelerometer to run an activity recognition algorithm or a vibration monitoring algorithm and to send the results to application. To enable the activity recognition algorithm on the MLC, you have to select the STBLESensor [Activity Recognition] tab. You can also work in debug mode using the STBLESensor debug console and writing the commands VibOn to initialize the vibration monitor algorithm, and VibOff to switch the vibration monitor algorithm off.
For debug purposes, as side feature, note also that both BLELowPower and BLEMLC applications enables the USB Virtual Com Port (VCP) to visualize printf to a Terminal (for example Tera Term) to control the initialization and connection phases and, at the boot, to define the name the STEVAL-MKSBOX1V1 will use for Bluetooth advertising. To enable the VCP, it is necessary to recompile the code, enabling the compilation define called STBOX1_ENABLE_PRINTF at the beginning of the BLELowPower/Inc/STBOX1_config.h or the BLEMLC/Inc/STBOX1_config.h file.
This tutorial is going to the end, just a little more effort ;)