MPU9250 Feedback Problem

Hey guys,

I'm trying to test my sensor here and display the data through serial connection, but I don't get any input data, just zeros. also Data isn't displayed accordingly to what the code says ..

#include <MPU9250.h>

MPU9250 IMU(Wire, 0x68);

float ax = 0;
float ay = 0;
float az = 0;

void setup() {

IMU.begin();

Serial.begin(9600);

}

void loop() {

IMU.readSensor();

ax = IMU.getAccelX_mss();
ay = IMU.getAccelY_mss();
az = IMU.getAccelZ_mss();

Serial.print(ax);
Serial.print('\t');
Serial.print(ay);
Serial.print('\t');
Serial.print(az);

delay(200);

}

What could possibly be the problem ?

The sensor may not wired properly, or is not functioning. Run the I2C address scanner to see if it is on the bus.

You need a level shifter to use a 5V Arduino with a 3.3V sensor.

1 Like

Thanks for the quick reply, I'm working with a Teensy LC here :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.