2024-08-07 02:18 PM - edited 2024-08-07 02:25 PM
Hello,
I just recently got into STM32 programming and I have a NUCLEO-F401RE with a IKS4A1 board. I am trying to print the heading data based on the ECompass example so I can eventually send it through UART. For now, I have used Unicleo-GUI to see that the sensors are indeed working and that the heading seems correct. However, when I try to printf the heading myself I'm getting a few hurdles.
To access the heading data, I went into the EC_Data_Handler function of the app_mems.c library. I made sure all sensors were enabled. However, I realized that the data_out.quaternion values are all zero. I tried looking into the MotionEC_manager_run function, but I can't even find the implementation of that.
Am I missing an external library?
How is it possible that Unileo-GUI is able to get the heading value and when I print it, it gives me zero?
I believe that once the quaternion issue is fixed, the heading will most likely follow.
Here is my project.