Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

BNO055 with Arduino 2560 pro mini
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BNO055 with Arduino 2560 pro mini

by Finist on Tue Apr 20, 2021 1:45 pm

Good day!
In our project we use BNO055 and Arduino mega pro 2560, 4 motors with drivers, bluetooth module and few I2C sensors. Everything works great, but there is one problem. After a few seconds, or minutes of work, BNO055 freezes: sensor readings sent via bluetooth are 0. If we using old library, then arduino freezes. After restarting, everything works just as well for a few seconds or minutes.
Code: Select all | TOGGLE FULL SIZE
 
x = bno.getHeading();
vr = (((x - prd) + 540) % 360) - 180;
Serial1.println(vr);
delay(10);

If we only read the values from the sensor and send them via bluetooth (while not using them anywhere in our calculations), everything also works fine.
Code: Select all | TOGGLE FULL SIZE
x = bno.getHeading();
vr = (((0 - prd) + 540) % 360) - 180;
Serial1.println(x);
delay(10);

Finist
 
Posts: 1
Joined: Tue Apr 20, 2021 1:03 pm

Re: BNO055 with Arduino 2560 pro mini

by blnkjns on Wed Apr 21, 2021 12:54 am

Is there anywhere a variable involved that has "room to grow" to the point of memory overflow? For example a data buffer somewhere? Check any pointers in your code, and make sure array counters do not get out of bounds.

blnkjns
 
Posts: 433
Joined: Fri Oct 02, 2020 3:33 am

Please be positive and constructive with your questions and comments.