Reemplace S-Function Level 2 with C-MEX to read IMU sensor by I2C, Possible???
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi all;
I'm making a quadcopter controller with Simulink using the Energia add-on for TivaC embedded launchpad.
To read the inertial sensor by I2C I made a s-function block level 2, but the maximum read frequency that I can raise is 250Hz, I need at least 400 - 500 Hz. I know that is possible because I made it with C code in Energia and I could reach 750Hz.
Reading on the web I found that the S-function blocks have slow function and an option to increase the speed is to make C-mex codes, but I don't have any idea of how doing a program to read a sensor, and I'm not sure that C-mex can do that.
Do you know if it's possible?, or do you have some idea to reduce the sample time?
Thanks a lot
Regards
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!