Noob here - need help with wiring the MPU-9150 (gyro/accel) to the Uno

It works. Thank you. :) :)

Hello Erdin, The MPU9150 works fine with libraries from Februar 2013.

I get the following error message when I use the current libraries.

Compiling 'Quad102' for 'Arduino Mega 2560 or Mega ADK' Quad102.ino : In file included from MPU6050_9Axis_MotionApps41.h : : In member function 'uint8_t MPU6050::dmpInitialize()': MPU6050_9Axis_MotionApps41.h : 'setXGyroOffsetUser' was not declared in this scope MPU6050_9Axis_MotionApps41.h : 'setYGyroOffsetUser' was not declared in this scope MPU6050_9Axis_MotionApps41.h : 'setZGyroOffsetUser' was not declared in this scope Error compiling

Your post dated "March 13, 2013, 07:08:29 pm".

I changed only the "MPU6050 6 Axis MotionApps 20.h" in "MPU6050 9Axis MotionApps4.h1" from the MPU6050 example. Isn´t that right?

Thank you for your patience. Willi

No that is not right. It might work if you carefully change the #include in every *.cpp file. But the library is complex enough, don't try to make things more difficult.

The compiler complains that it can't find some functions. It needs the *.h file for that.

Hey,

I don´t understand.
I use MPU 9150 breakout with level shifter. No file is changed.
I copied all libraries(_stup - TCA6424A) with changelog “2012-06-21” into the Arduino libraries folder.
I changed this part in the example “MPU6050_DMP6.ino”.

#include “I2Cdev.h”
#include <MPU6050_9Axis_MotionApps41.h> <----------
#include <helper_3dmath.h>
#include “Wire.h”
//#include “MPU6050_6Axis_MotionApps20.h”
//#include “MPU6050.h”

Compiling OK.

Now I copied the newest Lib-Versions (changelog 2013-05-08) into the Arduino libraries folder.

#include “I2Cdev.h”
#include <MPU6050_9Axis_MotionApps41.h> <----------
#include <helper_3dmath.h>
//#include “MPU6050_6Axis_MotionApps20.h”
//#include “MPU6050.h”

???
// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation
// is used in I2Cdev.h
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include “Wire.h”
#endif
???

Compiling ‘MPU6050_DMP6’ for ‘Arduino Nano w/ ATmega328’
MPU6050_DMP6.ino : In file included from
MPU6050_9Axis_MotionApps41.h : : In member function ‘uint8_t MPU6050::dmpInitialize()’:
MPU6050_9Axis_MotionApps41.h : ‘setXGyroOffsetUser’ was not declared in this scope
MPU6050_9Axis_MotionApps41.h : ‘setYGyroOffsetUser’ was not declared in this scope
MPU6050_9Axis_MotionApps41.h : ‘setZGyroOffsetUser’ was not declared in this scope
Error compiling

Please excuse me, but I do not understand.

Willi

I don't know what is wrong. Perhaps you have only half the new library, or the library itself is wrong. That include file is updated a few days ago and I read : "changelog : ongoing debug release". Perhaps you have to wait a few days and update everything.

Cood idea. Thanks. Willi

i have a big problem with mpu 9150 i tried more then one example about mpu 9150 and still having the same problem witch is >>>> calculating yaw , pitch , roll from the values ax , ay, az , gx , gy , gz , mx , my , mz .