Skip to main content
Graduate
August 15, 2021
Question

ST BLE Sensor App - Android - Sensor fusion

  • August 15, 2021
  • 1 reply
  • 834 views

Does the ST BLE Sensor provided on github has the rotating cube code?

Do the inputs provided to the rotating cube is coming from the sensor-fusion running on the embedded device or on the App side?

Can you please point the code and the source files which is taking the input

Regards,

    This topic has been closed for replies.

    1 reply

    darla14Author
    Graduate
    August 24, 2021

    Thanks for the reply,

    I was checking this code of the firmware :

    https://www.st.com/content/my_st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-ode-function-pack-sw/fp-sns-motenvwb1.license=1629827087075.product=FP-SNS-MOTENVWB1.version=1.0.0.html

    Here , the Quaternion characteristics are defined and I think here we are calling the below method to get the quaternions from the sensor fusion which is running in the Firmware ( STM32WB side) and then update the characteristics which are being received by the Classes you mention above in the App.

    ComputeQuaternions >

     /* Run Sensor Fusion algorithm */

     MotionFX_manager_run(pdata_in, pdata_out, MOTIONFX_ENGINE_DELTATIME);

    Quat_Update(MOTIONFX_Server_App_Context.quat_axes); > this then calls the  MOTENV_STM_App_Update_Char(MOTION_FX_CHAR_UUID, VALUE_LEN_QUAT, (uint8_t *)&value); which finally update the Quternion Charactertics and then it is being recieved by the App and Cube is rotated.

    Please correct me !

    Regards,

    D