2021-06-15 09:10 AM
I have limited experience coding in C and C++, and I am new to the interfacing of breakout boards. I have done a lot of reading on the documentation for the LSM6DSOX and feel quite familiar with its capacities, but I am finding the application of the code to be beyond my scope, at least for my project's timetable.
I'm trying to enable and access the Angle calculation (Section 6.4 in AN5273) from integration of gyroscope data in the Finite State Machine onboard the LSM6DSOX, while interfaced with Arduino UNO. I have yet to find any libraries or examples on GitHub that clearly align with my use case. Is this possible without the use of Unico GUI? If not, what would the process with Unico be for uploading a configuration to the board?
I attempted to find discussion of this on the Community Boards and Q/A sections. Apologies if I missed it.
2021-06-23 03:17 AM
Hi @NMitr.3 ,
Unico is useful for configuring the FSM in a debug phase: you can acquire data with the hardware, configure and tune FSM parameters with Unico, and then export the register configuration code as .h file in your C project.
For example, you can check the code on the Github platform (if you have not already done it), especially this repository --> lsm6dsox or lsm6dsox_fsm_raw.c.
Specifically for the Angle calculation feature, this should be simple since you don't have to configure many steps to get the angle as output, but it depends on the final requirements of your application.
-Eleon
2021-06-23 11:07 AM
Thanks @Eleon BORLINI ,
I have acquired the debugging tools STEVAL MKI109V3 and MKI197V1, and I am exploring the use of the FSM, and I am seeing that the interrupts are generated above certain thresholds as I define them. I was hoping to use the angle calculation to get the calculated angles, not necessarily just to generate interrupts above threshold.
I have spent some time learning more deeply about coding in C++ but I still do not know how best to integrate the Unico generated .h into the C++ I'm running with Arduino Uno. I have accessed the repositories you have pointed me too and learned from them, but the code seems to be based in the repositories for stm32duino, which seem not to be aligned with the use of an actual Arduino. I am missing the connection for implementing these types of resources in my device rather than ST's simulation of these devices.
If you could help make the connection between the Arduino and the examples you linked, that would be helpful. As well as to help generate the output from the angle calculation to be provided rather than to be compared to threshold for interrupt generation.
Thanks in advance.