MPU 6050 With Intel Galileo

Hello everyone, i’ve try to run any script for MPU 6050 sensor on my intel galileo and nothing is working.

I get some compiling errors:
\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:42:0,
from MPU6050_DMP6.ino:48:
\Arduino\libraries\MPU6050/MPU6050.h:45:26: fatal error: avr/pgmspace.h: No such file or directory
compilation terminated.

There is a tutorial on the internet to copy the pgmspace.h from a source and place it into library/avr/pgmspace.h but this doesn’t work just give more compiling errors on include Wire.h and other libraries.

Has anyone encounter this problem? can someone point me in the right direction please?
Thank you very much!

MPU6050_DMP6.ino (15.5 KB)

looks like the library was not installed correctly. How did you install it (exactly ?)

That library is written for the Arduino, AVR 8-bit Arduino to be exact (the Due case is handled by ifdefs but most library developers don’t care for the Galileo as it’s not an official Arduino project), you have to modify it to run on the Galileo.

You can get around that specific error by replacing this block

#ifndef __arm__
#include <avr/pgmspace.h>
#else
#define PROGMEM /* empty */
#define pgm_read_byte(x) (*(x))
#define pgm_read_word(x) (*(x))
#define pgm_read_float(x) (*(x))
#define PSTR(STR) STR
#endif

by

#define PROGMEM /* empty */
#define pgm_read_byte(x) (*(x))
#define pgm_read_word(x) (*(x))
#define pgm_read_float(x) (*(x))
#define PSTR(STR) STR