I tried to test the MPU6050 example on https://maker.pro/arduino/tutorial/how-to-interface-arduino-and-the-mpu-6050-sensor, but run into a number of compiler errors like these:
In file included from C:\Users\Thimo\AppData\Local\Temp\arduino_modified_sketch_323002\MPU6050_DMP6.ino:56:0:
D:\Users\Thimo\Documents\Arduino\libraries\MPU6050/MPU6050_6Axis_MotionApps20.h:69:26: error: conflicting declaration 'typedef uint32_t prog_uint32_t'
typedef uint32_t prog_uint32_t;
^
In file included from C:\Users\Thimo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/WString.h:29:0,
from C:\Users\Thimo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Arduino.h:146,
from sketch\MPU6050_DMP6.ino.cpp:1:
C:\Users\Thimo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32/pgmspace.h:30:23: note: previous declaration as 'typedef long unsigned int prog_uint32_t'
typedef unsigned long prog_uint32_t;
^
exit status 1
Fout bij het compileren voor board WEMOS LOLIN32
Found a similar issue on github with a solution to remove some lines in the library file MPU6050_6Axis_MotionApps20.h
, but then another error pops up:
D:\Users\Thimo\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readBytes(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)':
D:\Users\Thimo\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:276:62: error: 'BUFFER_LENGTH' was not declared in this scope
for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {
^
D:\Users\Thimo\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)':
D:\Users\Thimo\Documents\Arduino\libraries\I2Cdev\I2Cdev.cpp:414:70: error: 'BUFFER_LENGTH' was not declared in this scope
for (uint8_t k = 0; k < length * 2; k += min(length * 2, BUFFER_LENGTH)) {
^
exit status 1
Fout bij het compileren voor board WEMOS LOLIN32
Again, an error within a library file... What am I doing wrong? @FjodorvanSlooten, I used the libraries you provided on slack, but still the same errors appear.