Hi, I previously build a simulink model that uses 9 axis motion shield officially bought from official arduino website in 2015 with Arduino Mega 2560. In 2019-2020 I integrated it with my simulink model and it was working fine. (Using Matlab 2019/2020). I ordered new arduino mega board and a new 9 axis motion shield from official arduino website. I tried to apply the very same simulink model I made before, but the new 9 axis motion shield doesn't give any readings and only gives zeros even for the status. (now using Matlab 2024b). knowing that I correctly installed arduino hardware support packages for both matlab and simulink.
To see where the actual problem lies, a good place to start is to test the motion shield with the Arduino Mega 2560 alone, using one or more of the examples in the provided library, and report what you find.
Thank you for your answer.. I already test it with IDE, and it works fine.. the problem is needed to be solved in Simulink..
do you have any idea?
it seems that the problem is not in the Arduino or the sensor. Since few people on this forum use Matlab or Simulink, you might have better luck posting on the Matlab forum.
Yes, I know... I am in contact with Mathworks and still they have no solution..
What are you doing to debug the problem? Test all the basic operations and communications one by one.
A standard technique is to swap one of the components and see where the problem is.
I did.. it seems that the I2C is blocked, and there is no way to modify the library inside matlab as it was in previous versions..
What does I2C is blocked mean, makes no sense to me.
Why on earth would you modify a library. Are you prepared to offer 24/7/365 support for it? Just follow the established procedures.
Probably not, because you already stated that the Mega and the sensor shield work together as expected with library examples.
For help on this forum, post the code and the error messages. For instructions see the "How to get the best out of this forum" post.
I meant the wire.h file in simulink not in IDE.
The model in Simulink is very simple, just a block of the BNO055 sensor and a scop to visualise the readings.. I cannot put the whole original model I built.. but the simple one just doesn't out put any data.. this is in the case of running the code on the Arduino mega 2560.
In the case of running the model in the (SIL) mode, i.e. running on simulink, while reading the sensor data from the board, the error message is : I2C is not available.
That makes no sense to me. Simulink/Matlab problem, not Arduino.
Yes, I know... So I am looking if someone in the Arduino community faced a similar problem in simulink..