I attempt to use seneors on the flatform FRDM-K66F to measure some inertial parameters such as accereation and rotation angles. Is there any way to get get the moment when the board obtains those data and output print those data together? for example, I'd like to get output print as follow:
t_1, a_1, r_1
t_2, a_2, r_2
.....
where t is the sample moment, a is the acceleration, r is the rotation angle.
Hello Yue Zeng
To obtain the time the sensor acquires the sample you can set an MCU Timer to loop the process of reading and processing data. These timers can be the PIT module if your project is on bare-metal or the systick if you are using FreeRTOS. You can use the timer that is more convenient to you.
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar