MPU6050 hakkında hata
  • Merhaba
    Bir sorunum var arkadaşlar bilgisi olan varsa cevaplamasını rica ederim.
    Arduino Uno ile daha önce versiyon 1.0.6'da MPU6050 sensörünü kullandım hatta print ile çıktı alıyordum pc ye format attım herşeyi tekrardan kurdum ve su an kaydettiğim *.ino projem hata vermektedir. şu an versiyonum 1.6.5dir.
    aldığım hata aşağıdaki şekildedir.
    eğer elinizde tüm dosyaları ile MPU6050 çalışan proje var ise onuda alabilirim.

    YARDIMLARINIZI RİCA EDERİM.


    *****************HATA******************************
    Arduino:1.6.5 (Windows 8.1), Kart:"Arduino Uno"

    In file included from twomey_MPU6050_DMP6.ino:3:0:
    MPU6050_6Axis_MotionApps20.h:89: error: 'prog_uchar' does not name a type
    const prog_uchar dmpMemory[MPU6050_DMP_CODE_SIZE] PROGMEM = {
    ^
    MPU6050_6Axis_MotionApps20.h:229: error: 'prog_uchar' does not name a type
    const prog_uchar dmpConfig[MPU6050_DMP_CONFIG_SIZE] PROGMEM = {
    ^
    MPU6050_6Axis_MotionApps20.h:271: error: 'prog_uchar' does not name a type
    const prog_uchar dmpUpdates[MPU6050_DMP_UPDATES_SIZE] PROGMEM = {
    ^
    MPU6050_6Axis_MotionApps20.h: In member function 'uint8_t MPU6050::dmpInitialize()':
    MPU6050_6Axis_MotionApps20.h:342: error: 'dmpMemory' was not declared in this scope
    if (writeProgMemoryBlock(dmpMemory, MPU6050_DMP_CODE_SIZE)) {
    ^
    MPU6050_6Axis_MotionApps20.h:349: error: 'dmpConfig' was not declared in this scope
    if (writeProgDMPConfigurationSet(dmpConfig, MPU6050_DMP_CONFIG_SIZE)) {
    ^
    In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WString.h:29:0,
    from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:26,
    from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26,
    from C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire/Wire.h:26,
    from twomey_MPU6050_DMP6.ino:1:
    MPU6050_6Axis_MotionApps20.h:390: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    MPU6050_6Axis_MotionApps20.h:394: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    MPU6050_6Axis_MotionApps20.h:433: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    MPU6050_6Axis_MotionApps20.h:437: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    MPU6050_6Axis_MotionApps20.h:441: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    MPU6050_6Axis_MotionApps20.h:459: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    MPU6050_6Axis_MotionApps20.h:478: error: 'dmpUpdates' was not declared in this scope
    for (j = 0; j < 4 || j < dmpUpdate[2] + 3; j++, pos++) dmpUpdate[j] = pgm_read_byte(&dmpUpdates[pos]);
    ^
    'prog_uchar' does not name a type

    Rapor daha fazla veri içermeli
    "Derleme sırasında ayrıntılı çıktı göster"
    Dosya > Tercihler'de etkinleştirilmiş.
  • Buda arduino.cc den yönlendiren siteden aldığım örnek kodda ki hata


    Arduino:1.6.5 (Windows 8.1), Kart:"Arduino Uno"

    MPU6050.cpp.o: In function `MPU6050::setFullScaleGyroRange(unsigned char)':
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:3067: undefined reference to `I2Cdev::writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
    MPU6050.cpp.o: In function `MPU6050::setFullScaleAccelRange(unsigned char)':
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:3086: undefined reference to `I2Cdev::writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
    MPU6050.cpp.o: In function `MPU6050::getMotion6(int*, int*, int*, int*, int*, int*)':
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:3101: undefined reference to `I2Cdev::readTimeout'
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:3101: undefined reference to `I2Cdev::readTimeout'
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:3105: undefined reference to `I2Cdev::readBytes(unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)'
    MPU6050.cpp.o: In function `MPU6050::setSleepEnabled(bool)':
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:2450: undefined reference to `I2Cdev::writeBit(unsigned char, unsigned char, unsigned char, unsigned char)'
    MPU6050.cpp.o: In function `MPU6050::setClockSource(unsigned char)':
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:2543: undefined reference to `I2Cdev::writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)'
    MPU6050.cpp.o: In function `MPU6050::getDeviceID()':
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:2764: undefined reference to `I2Cdev::readTimeout'
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:2764: undefined reference to `I2Cdev::readTimeout'
    C:\Users\Tuncay\AppData\Local\Temp\build2068629214487524770.tmp/MPU6050.cpp:2764: undefined reference to `I2Cdev::readBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)'
    collect2.exe: error: ld returned 1 exit status
    Derleme sırasında hata oluştu.

    Rapor daha fazla veri içermeli
    "Derleme sırasında ayrıntılı çıktı göster"
    Dosya > Tercihler'de etkinleştirilmiş.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook

Tagged

Açık kaynak kültürü gereği, çözdüğünüz problemlerin çözümlerini paylaşmayı lütfen unutmayın.