ST BLE Sensor: Project code for the Data recorder app used on SensorTile.box
Hi, I created a SensorTile.box project in STM32CubeIDE in which I am receiving the acceleration data from the LSM6DSOX accelerometer. I would like to convert the data I receive from the sensor into the [mg] unit in the same way it is converted in the Data recorder app which you can download on to the SensorTile.box when using the ST BLE Sensor app. Thats why I am wondering if there is any Project code for the Data recorder app, where I could see how the calculation is performed. (I require the same kind of data because I have taught a machine learning model on data received from using the Data recorder app)
I have set the accelerometer to work at 104 Hz and 4g. My current calculation of accelerometer data is based off of the code I found in the SensorTileBox-BLESensors project from the FP-SNS-STBOX1 function pack. Here is the code (for the X axis, Y and Z are also calculated like X) I am using to get the acceleration data and convert it to the [mg] unit:




For instance the data I received from the app while the SensorTile.box was stationary, was around 993 mg on the Z axis. When I used my own project and the SensorTile.box was in the same position, the data was around 960 mg on the Z axis. That is why I am assuming that I am not converting the data correctly.
Thank you in advance.

