I'm trying to use the MPU-6050 code from Jeff Rowberg in the FreeIMU library (MPU6050_raw.ino). I've modified references from MPU6050 to MPU60X0 and included the SPI library in the sketch. When I compile the sketch using arduino1.5.1r2 for an Arduino Mega2560 board, it works fine. However when I compile the sketch for an Arduino Due, I get the following error:

I'm also experiencing the same issue. I'll admit I'm over my head here for the most part although I was able to successfully able to implement SomeRandomGuy's improvement to address some of the issues.

I also added "#define prog_uchar uint8_t" before the "#endif" to address the "error: invalid conversion from 'const char*' to 'const uint8_t*'" errors.

EDIT: Oh, and I also commented out all the 'F' flags in the MPU6050_DMP6 sketch in the "Serial.println(F("example text"));" commands because of the error "error: 'PSTR' was not declared in this scope".

i am also trying to make FreeIMU library work on the due.. with the above changes and some other minor tweaks i get the "raw" example running fine... calibration is another matter to be solved later since it seems to require eeprom...

i have another problem though.. in the FreeIMU.cpp the code does an update frequency calculation in the getQ function, i believe.. time is measured using the micros() function... this, however returns 0 in my case, so the frequency calculation returns a NaN (division by zero, of course)..

I had similar problems with the lack of avr/pgmspace.h in the MPU6050 code. Don't know if my fixes are legit by I basically just got rid of all uses of program space functions ( PROGMEM, pgm_read_byte(), prog_uchar, etc) and replaced them with regular memory assignments and access calls. I just wanted it to work. Performance was of secondary importance.

There are also several functions that take a parameter argument "useProgMem" where it appears to be a mechanism for not using pgmspace features. Unfortunately, the technique still fails if the entire header is unavailable. There are also few places that continue to use the pgmspace functions and ignore the "useProgMem" option.

There were a few other miscellaneous changes which I can't remember.

I had problems within the loop() code in the MPU6050_DMP6 example. Specifically, the first while-loop that checks the interupt & fifoCount would get stuck. Reading the comments, it seems the author anticipated this problem. I just changed it to:

Not elegant but functional. After all the changes, my hacked version of the motion fusion example works great with my Sparkfun MPU9150 breakout (http://www.sparkfun.com/products/11486?) on my Arduino Due. (The unaltered code already worked fine with my Uno.)

I'm curious about the range of values people are getting from their sensors. When using Jeff's MPU6050_DMP6 sketch with "#define OUTPUT_READABLE_WORLDACCEL" uncommented, what do your resting values trend to?

As I understand it, these should all approach zero after perhaps 30 seconds however I get a weird response from my z-axis. Its value hovers around 3500 when placed undisturbed on the table (positive z up). It appears to have some offset to it as it doesn't tend to zero when the orientation is changed such that z is parallel with the table surface.