This is totally confusing me - I'm trying to use the MPU6050 library to send gyroscope/accelerometer data via an Xbee to another Arduino. I added the MPU6050_DMP6 example file to my project so that it's a tab, and I made it a .cpp file so I could include it in my main program loop. I run the MPU6050 program loop whenever I want a new gyro/accel reading, and then I access the updated variables from the main program loop. The program won't compile because the compiler can't find the libraries that the .cpp file references. I've looked all over the place for a solution - I've tried including the libraries in the main program loop, but then the compiler goes crazy with errors.
Here's the include line in the main program:
#include "MPU6050_DMP6.cpp";
Attached is the MPU6050_DMP6.cpp file and the error that these two files throw - you can see the tab setup there.
Any help is much appreciated.
MPU6050_DMP6.cpp (16 KB)