Just trying to run someone else's code for the MPU6050 and this error comes up at Wire.begin(); it has wire included so idk why it's doing it. I've tried taking the include wire.h statement out of the if statement in case that's the fault but it didn't fix it. The full sketch is attached.
C:\Users\Thomas\Desktop\University work\Rocket Group Business Project\Electronics\MPU6050\examples\MPU6050_DMP6\MPU6050_DMP6.ino: In function 'void setup()':
MPU6050_DMP6:165:9: error: 'Wire' was not declared in this scope
Wire.begin();
^
Multiple libraries were found for "I2Cdev.h"
Used: C:\Users\Thomas\Documents\Arduino\libraries\I2Cdev
Not used: C:\Users\Thomas\Documents\Arduino\libraries\arduino_323842
Multiple libraries were found for "MPU6050_6Axis_MotionApps20.h"
Used: C:\Users\Thomas\Documents\Arduino\libraries\MPU6050
Not used: C:\Users\Thomas\Documents\Arduino\libraries\arduino_323842
exit status 1
'Wire' was not declared in this scope
I think because you don't use wire in the code if it isn't true, it does it another way, and therefore there is no need to include the library, but even still it doesn't work when you take it out the if statement.