I'm trying to use Sparkfun's library for the BNO080 IMU on a Teensy 4.0. I'm able to run the example on a Teensy 3.6, but it does not run on a 4.0.
I've read the thread on the BNO055, and tried adding some delays in the start sequence. It did not resolve the problem.
On the 4.0, if I build with the I2C scanner, it identifies the unit address correctly at 0x4B.
From investigation, I don't think it is getting through the 'begin' routine of the Sparkfun Library.
The interface to the 080 is different than the 055, but the I2C interface problem seems similar.
The Teensy initially sends a 'Reset' packet. The 080 responds with an 'Advertisement' response.
The library is set up to read/dump this data, and end in a ready state. I don't think it makes it through the read stage. I haven't yet been able to tear up the code enough to instrument it to figure out exactly where.
I've attached the code below of the example Accelerometer interface code.
Any help, or directions to investigate next, would be greatly appreciated!
https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library
I've read the thread on the BNO055, and tried adding some delays in the start sequence. It did not resolve the problem.
On the 4.0, if I build with the I2C scanner, it identifies the unit address correctly at 0x4B.
From investigation, I don't think it is getting through the 'begin' routine of the Sparkfun Library.
The interface to the 080 is different than the 055, but the I2C interface problem seems similar.
The Teensy initially sends a 'Reset' packet. The 080 responds with an 'Advertisement' response.
The library is set up to read/dump this data, and end in a ready state. I don't think it makes it through the read stage. I haven't yet been able to tear up the code enough to instrument it to figure out exactly where.
I've attached the code below of the example Accelerometer interface code.
Any help, or directions to investigate next, would be greatly appreciated!
Code:
#include <Wire.h>
#include "SparkFun_BNO080_Arduino_Library.h"
BNO080 myIMU;
void setup()
{
Serial.begin(9600);
Serial.println();
Serial.println("BNO080 Read Example");
Wire.begin();
myIMU.begin();
Wire.setClock(400000); //Increase I2C data rate to 400kHz
myIMU.enableAccelerometer(50); //Send data update every 50ms
Serial.println(F("Accelerometer enabled"));
Serial.println(F("Output in form x, y, z, in m/s^2"));
}
void loop()
{
//Look for reports from the IMU
if (myIMU.dataAvailable() == true)
{
float x = myIMU.getAccelX();
float y = myIMU.getAccelY();
float z = myIMU.getAccelZ();
Serial.print(x, 2);
Serial.print(F(","));
Serial.print(y, 2);
Serial.print(F(","));
Serial.print(z, 2);
Serial.print(F(","));
Serial.println();
}
}
https://github.com/sparkfun/SparkFun_BNO080_Arduino_Library