Hallo zusammen,
Ich möchte einen Servomotor mit dem MPU 6050 ansteuern und habe mir dazu folgendes Video angeschaut:
Ich habe alles so gemacht wie im Video erklärt, jedoch kommt eine Fehlermeldung.
Ich habe die Datei unten beigefügt, hoffentlich wird einer von euch daraus schlau 
MPU6050_DMP6.ino (16.3 KB)
Es wäre auch sinnvoll, uns die Fehlermeldung mitzuteilen.
Setze sie bitte in Codetags (</>-Button oben links im Forumseditor oder [code] davor und [/code] dahinter ohne *).
Dann ist er auch auf mobilen Geräten besser lesbar.
Gruß Tommy
Da muss jemand zuerst mal ein bischen Programmieren lernen.
Entschuldigung, hier ist die Fehlermeldung:
Arduino: 1.8.12 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
<artificial>:(.text.startup+0xdc): undefined reference to `MPU6050::MPU6050(unsigned char)'
C:\Users\Simon\AppData\Local\Temp\cc5yxPda.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0x3ae): undefined reference to `MPU6050::initialize()'
<artificial>:(.text.startup+0x3c4): undefined reference to `MPU6050::testConnection()'
<artificial>:(.text.startup+0x420): undefined reference to `MPU6050::reset()'
<artificial>:(.text.startup+0x436): undefined reference to `MPU6050::setSleepEnabled(bool)'
<artificial>:(.text.startup+0x444): undefined reference to `MPU6050::setMemoryBank(unsigned char, bool, bool)'
<artificial>:(.text.startup+0x44e): undefined reference to `MPU6050::setMemoryStartAddress(unsigned char)'
<artificial>:(.text.startup+0x464): undefined reference to `MPU6050::readMemoryByte()'
<artificial>:(.text.startup+0x48a): undefined reference to `MPU6050::setMemoryBank(unsigned char, bool, bool)'
<artificial>:(.text.startup+0x496): undefined reference to `MPU6050::setSlaveAddress(unsigned char, unsigned char)'
<artificial>:(.text.startup+0x4a0): undefined reference to `MPU6050::setI2CMasterModeEnabled(bool)'
<artificial>:(.text.startup+0x4ac): undefined reference to `MPU6050::setSlaveAddress(unsigned char, unsigned char)'
<artificial>:(.text.startup+0x4b4): undefined reference to `MPU6050::resetI2CMaster()'
<artificial>:(.text.startup+0x4ca): undefined reference to `MPU6050::setClockSource(unsigned char)'
<artificial>:(.text.startup+0x4d4): undefined reference to `MPU6050::setIntEnabled(unsigned char)'
<artificial>:(.text.startup+0x4de): undefined reference to `MPU6050::setRate(unsigned char)'
<artificial>:(.text.startup+0x4e8): undefined reference to `MPU6050::setExternalFrameSync(unsigned char)'
<artificial>:(.text.startup+0x4f2): undefined reference to `MPU6050::setDLPFMode(unsigned char)'
<artificial>:(.text.startup+0x4fc): undefined reference to `MPU6050::setFullScaleGyroRange(unsigned char)'
<artificial>:(.text.startup+0x514): undefined reference to `MPU6050::writeProgMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool)'
<artificial>:(.text.startup+0x538): undefined reference to `MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)'
<artificial>:(.text.startup+0x542): undefined reference to `MPU6050::setDMPConfig1(unsigned char)'
<artificial>:(.text.startup+0x54c): undefined reference to `MPU6050::setDMPConfig2(unsigned char)'
<artificial>:(.text.startup+0x556): undefined reference to `MPU6050::setOTPBankValid(bool)'
<artificial>:(.text.startup+0x560): undefined reference to `MPU6050::setMotionDetectionThreshold(unsigned char)'
<artificial>:(.text.startup+0x56a): undefined reference to `MPU6050::setZeroMotionDetectionThreshold(unsigned char)'
<artificial>:(.text.startup+0x574): undefined reference to `MPU6050::setMotionDetectionDuration(unsigned char)'
<artificial>:(.text.startup+0x57e): undefined reference to `MPU6050::setZeroMotionDetectionDuration(unsigned char)'
<artificial>:(.text.startup+0x588): undefined reference to `MPU6050::setFIFOEnabled(bool)'
<artificial>:(.text.startup+0x590): undefined reference to `MPU6050::resetDMP()'
<artificial>:(.text.startup+0x59a): undefined reference to `MPU6050::setDMPEnabled(bool)'
<artificial>:(.text.startup+0x5ae): undefined reference to `MPU6050::resetFIFO()'
<artificial>:(.text.startup+0x5b6): undefined reference to `MPU6050::getIntStatus()'
<artificial>:(.text.startup+0x5c8): undefined reference to `MPU6050::setXGyroOffset(int)'
<artificial>:(.text.startup+0x5d4): undefined reference to `MPU6050::setYGyroOffset(int)'
<artificial>:(.text.startup+0x5e0): undefined reference to `MPU6050::setZGyroOffset(int)'
<artificial>:(.text.startup+0x5ec): undefined reference to `MPU6050::setZAccelOffset(int)'
<artificial>:(.text.startup+0x606): undefined reference to `MPU6050::setDMPEnabled(bool)'
<artificial>:(.text.startup+0x62e): undefined reference to `MPU6050::getIntStatus()'
<artificial>:(.text.startup+0x68c): undefined reference to `MPU6050::getIntStatus()'
<artificial>:(.text.startup+0x698): undefined reference to `MPU6050::getFIFOCount()'
<artificial>:(.text.startup+0x6ba): undefined reference to `MPU6050::resetFIFO()'
<artificial>:(.text.startup+0x76c): undefined reference to `MPU6050::getFIFOCount()'
<artificial>:(.text.startup+0x782): undefined reference to `MPU6050::getFIFOBytes(unsigned char*, unsigned char)'
collect2.exe: error: ld returned 1 exit status
Bibliothek I2Cdev im Ordner: E:\Simon\Documents\Arduino\libraries\I2Cdev (legacy) wird verwendet
Bibliothek Wire in Version 1.0 im Ordner: C:\Users\Simon\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\libraries\Wire wird verwendet
Bibliothek MPU6050_6Axis_MotionApps20 im Ordner: E:\Simon\Documents\Arduino\libraries\MPU6050_6Axis_MotionApps20 (legacy) wird verwendet
Bibliothek helper_3dmath im Ordner: E:\Simon\Documents\Arduino\libraries\helper_3dmath (legacy) wird verwendet
Bibliothek MPU6050 im Ordner: E:\Simon\Documents\Arduino\libraries\MPU6050 (legacy) wird verwendet
Bibliothek Servo in Version 1.1.6 im Ordner: E:\Simon\Documents\Programme\Arduino\libraries\Servo wird verwendet
exit status 1
Fehler beim Kompilieren für das Board Arduino Mega or Mega 2560.
Das klingt danach, dass die MPU6050-Lib nicht richtig installiert ist.
Wahrscheinlich findet die IDE die MPU6050.cpp nicht.
Gib uns mal einen Link zur Lib.
Gruß Tommy
Ok Problem behoben, ich hatte eine falsche Library verwendet :o
Trotzdem vielen Dank für eure Hilfe.