I going to explain how to work the Arduino Due with MPU-9150 (9 Degrees of Freedom - MPU-9150 Breakout) from Sparkfun and MPU9150Lib from Pansenti.The Library:
You can download the Library from: https://github.com/Pansenti/MPU9150Lib
To install the library, please follow the tutorial http://arduino.cc/en/Guide/Libraries
I use the manual installation. Inside the zip file, there a directory called "libraries", use it!!Wiring:
We only need 4 pin conection
Arduino Due MPU-9150
SDA (pin 20) SDA
SCL (pin 21) SCLThe Sketch:
The final step is run the example sketch from the library with Due support.
From the zip file, there a special sketck with Due support, you can find this in directory called "Due9150"The Output:
Some time we can receive a "Error Message" from the console, to fix the problem, unplug the Arduino (turn off) and conect again (turn on).
For more details, please read the documentation.