Hi,
I'm actualy trying to use your library but i've encountered some errors.
I first downloaded the .zip with all the files. I extracted it in my project folder and opened it in Arduino IDE. It didn'T build at first because of the #define i had to put in inv_mpu.cpp.
Once i've put my "#define MPU6050" i tried to build but got some more errors:
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readBytes(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)':
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp:276: error: 'BUFFER_LENGTH' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp:277: error: 'Wire' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)':
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp:414: error: 'BUFFER_LENGTH' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp:415: error: 'Wire' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static bool I2Cdev::writeBytes(uint8_t, uint8_t, uint8_t, uint8_t*)':
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp:598: error: 'Wire' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp: In static member function 'static bool I2Cdev::writeWords(uint8_t, uint8_t, uint8_t, uint16_t*)':
C:\Program Files (x86)\Arduino\libraries\I2Cdev\I2Cdev.cpp:653: error: 'Wire' was not declared in this scope
These are quite simple errors but i can't find the origine.
Wire is declared a bit higher in the code:
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE
#ifdef I2CDEV_IMPLEMENTATION_WARNINGS
#warning Using I2CDEV_BUILTIN_NBWIRE implementation may adversely affect interrupt detection.
#warning This I2Cdev implementation does not support:
#warning - Repeated starts conditions
#endif
// NBWire implementation based heavily on code by Gene Knight Gene@Telobot.com
// Originally posted on the Arduino forum at http://arduino.cc/forum/index.php/topic,70705.0.html
// Originally offered to the i2cdevlib project at http://arduino.cc/forum/index.php/topic,68210.30.html
TwoWire Wire;
#endif
At fisrt I tought that it was because it was in a if condition and the compiler just ignored it, but even if i put just after the if condition, the compiler says:
I2Cdev.cpp:90: error: 'TwoWire' does not name a type
I know for sure that all the code in the if condition is not executed because i wrote some random code and it didn't flaged it.
Once there, i don't realy know what else to do.
For the BUFFER_LENGTH error i can't find the problem either. This constant is used in other functions but the readBytes and readWords don't recognize the BUFFER_LENGTH.
Since i didn't wrote anything in the code, i trust that it should be working fine but it won't on my computer.
If you have anything to help me it would be realy awesome !
Thanks in advance,
Marvin.