MPU6050

Hey all,
Im working on an quadcopter, using arduino as the controller. Now im planning on using the MPU6050 to calculate Yaw,Pitch and Roll. But i cant seem to find some simple code on how to get it from the MPU6050. I have played with the examples but cant find a way to simplify the code. Is there a way to do this? or are there other sensors which are easier to use? All i need is Yaw, Pitch and Roll.
Took a look at the ADXL345, and it looks simpler? Any recommendations/idea's?

Thanks in advance :slight_smile:

Rinke

The i2cdevlib 'dmp' example lets you select what you want. You don't have to use the other things.
http://www.i2cdevlib.com/

At the end of the first post of the Kalman Guide is a link to code for the MPU-6050
http://forum.arduino.cc/index.php?topic=58048.0

The MPU-6050 does not give a good Yaw. You need a magnetometer for that.
For example the HMC8553L or the MPU-9150.

Thanks, ill have a look into those.
But what i was looking for is if i could find a simple sensor to use. Now i know i shouldnt expect a "Plug-n-Play" Sensor. But basically what im looking for is the most simplest way of getting decent accuracy Yaw/Pitch/Roll out of a sensor. What is the closest thing i could get?
Im pretty new to gyro's and accellerometers' btw.

Thanks in advance

I had a good look into the Kalman code, and its much more compact than the code i have before. Thanks very much. I will be using this probably. Would i be able to just use a magnetometer beside it then? or do you recommend buying the MPU9150?

That link in the Kalman Guide has also code for MPU-6050 + HMC8553L.