MATLAB Answers

Simulink BNO055 with Arduino Mega 2560

19 views (last 30 days)
SRance
SRance on 16 Sep 2020
Commented: Ege Gediksiz about 14 hours ago
Hi all,
I'm having trouble with the BNO055 block (from the Simulink from the Simulink Hardware Support Package for Arduino in R2020a) when used with an Arduino Mega 2560. In my case the BNO055 is mounted on the Arduino 9 Axis Motion Shield.
I've already tested this sensor in the Arduino IDE and found functional communication on 0x28 I2C with the key being to use the Wire.begin() to ensure I2C starts up, however when I used in Simulink it just doesn't work, I get -1 Status errors implying I2C communication is down.
My best guess is that the I2C begin hasn't even started when this block is used alone however with no examples of its use I am stumped.
Has anyone successfully applied this block and have any suggestions in getting it to work?
Thanks in advance!

  1 Comment

Ege Gediksiz
Ege Gediksiz about 14 hours ago
Similar problem here.
My Arduino Mega and BNO055 works perfectly with normal IDE (can read all sensor values).
I want to use it in Simulink Connected IO normal mode to control a test platform with some actuators, I need the IMU readings in Simulink.
The Simulink block for BNO055 (Arduino hardware support package for Simulink) works perfectly in external mode, when the running is done on the Arduino board with the exported model file dumped into the board. But does not work in normal mode (Connected IO). ( I cannot continue in external mode because the finished model exceeds avaliable data space in the Arduino, I will try uploading the larger model with an SD card extension, hopefully it can solve data space problem)
Caused by:
  • Please check the I2C slave address."
The problem is not with the I2C addres since it is correct ın the IDE and external mode. But in my opinion it cannot execute those .p files for some reason. Stops at line 0...
Any ideas?

Sign in to comment.

Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!