Problem MPU6050

Hello,

I try to realize a controller for my drone by using an MPU6050.

In organizing my code I have this big error message :

sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of intPin’
sketch/KrisW.cpp.o (symbol from plugin):(.text+0x0): first defined here
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/…/lib/gcc/avr/4.9.2/…/…/…/…/avr/bin/ld: Disabling relaxation: it will not work with multiple definitions
sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of SelfTest’
sketch/KrisW.cpp.o (symbol from plugin):(.text+0x0): first defined here
sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of gyroBias’
sketch/KrisW.cpp.o (symbol from plugin):(.text+0x0): first defined here
sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of accelBias’
sketch/KrisW.cpp.o (symbol from plugin):(.text+0x0): first defined here
sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of accelCount’
sketch/KrisW.cpp.o (symbol from plugin):(.text+0x0): first defined here
sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of aRes’
sketch/KrisW.cpp.o (symbol from plugin):(.text+0x0): first defined here
sketch/MainFiltreColin.ino.cpp.o (symbol from plugin): In function `setup’:

Can you help me please ?
Here are the beginning of my .ino and .cpp, if you want see the entire code :

Thank you very much !!!

MainFiltreColin.ino :
#include “KrisW.h”
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <MPU6050.h>
#include <I2Cdev.h>
#include <MPU6050_6Axis_MotionApps20.h>

KrisW.cpp :
#include “KrisW.h”
#include <I2Cdev.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <MPU6050.h>
#include <MPU6050_6Axis_MotionApps20.h>

I didn't look closely at your code but I recommend you to try adding include guards to KrisW.h:

It doesn't work :confused:

coliin09:
It doesn't work :confused:

...is probably the least useful thing you could waste your five minute post throttle on.