[Solved] MPU6050 and DUE

I'm currently having the exact same error as posted in this link: http://arduino.cc/forum/index.php/topic,139378.0.html
But when I try to use the authors solution, my system still gives me the original error. I've added the MPU6050.h and commented out anything to do with pgm_read_byte. I've added the accelgyro.setSleepEnabled(false); function as well as accelgyro.initialize(); though this gave me an error so I also added MPU6050 accelgyro;

I'd like to know if anyone has actually gotten this to work?

I have solved the issue, my AD0 pin was floating, here are the steps I followed:
1)Connection is as follows:
VCC - Arduino 3.3V
GND - Arduino GND
SCL - Arduino SCL
SDA - Arduino SDA
AD0 - Arduino GND
INT - Arbitrary pin on DUE board but as defined in http://arduino.cc/en/Reference/AttachInterrupt (attachInterrupt(pin, function, mode))
2) Download the MPU6050.h as well as MPU6050.cpp and the example code from: i2cdevlib/Arduino/MPU6050 at master · jrowberg/i2cdevlib · GitHub
3) Comment out #include <avr/pgmspace.h> in the MPU6050.h
4) Comment out any lines containing useProgMem (Lines 2975,2986,3020,3039, etc.)

The sample code should be running. This solution was found in this post by http://arduino.cc/forum/index.php/topic,139378.0.html by badben.

Hi,
I'm trying to get working MPU 9150, which is basically MPU 6050+magnetometer.
I'm using Arduino due with MPU's 9150 Sprakfun breakout board where AD0 is by default connected to GND.
I was following your instructions, but unfortunately I didn't manage to get it working.
Here is the output of serial monitor from MPU6050_raw:
Initializing I2C devices...
Testing device connections...
MPU6050 connection failed
a/g: 0 0 0 0 0 0
a/g: 0 0 0 0 0 0
...

Than I have tried to run also i2c_scanner modified by inserting accelgyro.setSleepEnabled(false); with result:
I2C Scanner
Scanning...
No I2C devices found

There is one thing I didn't understand from your post - do I have to connect INT to Arduino? At the moment it's not connected.
Another thing is - do you connect SDA to SDA1 or SDA20? (similarly SCL to SCL1 or SCL21?)
How can I check the most simple way if the sensor is working at all? I'm worrying, that I got not working sensor from sparkfun...

Thanks very much for any help.

Hello Castler

Firstly yes, I connected two 4.8K resistors to the SDA and SCl lines. Also I've connected the sensor to SDA on pin 20 and SCL on pin 21(or as you stated it SDA20 and SCL21). What I suspect is that the MPU9150 has a different I2C address than the MPU6050, check the MPU9150 datasheet for it's address and then edit the MPU6050.h folder with the new adress. Please tell me if you have any progress on this.