Hi,
I'm trying to used code that worked fine on Arduino IDE, but is being rejected by IoT. The error messages identify several problems:
-
I was using MPU6050.h, but IoT substitutes a different one. It then complains about differences.
-
It is also asking for libraries I've never used: "RTC.h", I think because it is linked to the substitue library it uses. I would prefer to use my original library, refer question 4 below.
-
The IMU substitute library then does not accept some variables I have of int16_t or int32_t type.
-
Most importantly, can I load the specific libraries I have onto IoT?
I would appreciate any help. Thanks!
Here are the error messages:
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readBytes(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)':
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/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)) {
^~~~~~~~~~~~~
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp:276:62: note: suggested alternative: 'I2C_BUFFER_LENGTH'
for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {
^~~~~~~~~~~~~
I2C_BUFFER_LENGTH
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)':
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp:416:70: error: 'BUFFER_LENGTH' was not declared in this scope
for (uint8_t k = 0; k < length * 2; k += min(length * 2, BUFFER_LENGTH)) {
^~~~~~~~~~~~~
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp:416:70: note: suggested alternative: 'I2C_BUFFER_LENGTH'
for (uint8_t k = 0; k < length * 2; k += min(length * 2, BUFFER_LENGTH)) {
^~~~~~~~~~~~~
I2C_BUFFER_LENGTH
Multiple libraries were found for "MPU6050.h"
Used: /home/builder/opt/libraries/grove_imu_9dof_1_0_0
Not used: /home/builder/opt/libraries/mpu6050_1_0_0
Multiple libraries were found for "RTC.h"
Used: /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.0.4/libraries/RTC
Not used: /home/builder/opt/libraries/m5core2_0_1_7
Not used: /home/builder/opt/libraries/m5stickc_0_2_9
Not used: /home/builder/opt/libraries/m5stickcplus_0_1_0
Not used: /home/builder/opt/libraries/m5station_0_0_1
Error during build: exit status 1
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readBytes(uint8_t, uint8_t, uint8_t, uint8_t*, uint16_t)':
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/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)) {
^~~~~~~~~~~~~
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp:276:62: note: suggested alternative: 'I2C_BUFFER_LENGTH'
for (uint8_t k = 0; k < length; k += min(length, BUFFER_LENGTH)) {
^~~~~~~~~~~~~
I2C_BUFFER_LENGTH
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp: In static member function 'static int8_t I2Cdev::readWords(uint8_t, uint8_t, uint8_t, uint16_t*, uint16_t)':
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp:416:70: error: 'BUFFER_LENGTH' was not declared in this scope
for (uint8_t k = 0; k < length * 2; k += min(length * 2, BUFFER_LENGTH)) {
^~~~~~~~~~~~~
/home/builder/Arduino/libraries/grove_imu_9dof_1_0_0/I2Cdev.cpp:416:70: note: suggested alternative: 'I2C_BUFFER_LENGTH'
for (uint8_t k = 0; k < length * 2; k += min(length * 2, BUFFER_LENGTH)) {
^~~~~~~~~~~~~
I2C_BUFFER_LENGTH
Multiple libraries were found for "MPU6050.h"
Used: /home/builder/opt/libraries/grove_imu_9dof_1_0_0
Not used: /home/builder/opt/libraries/mpu6050_1_0_0
Multiple libraries were found for "RTC.h"
Used: /home/builder/.arduino15/packages/arduino/hardware/renesas_uno/1.0.4/libraries/RTC
Not used: /home/builder/opt/libraries/m5core2_0_1_7
Not used: /home/builder/opt/libraries/m5stickc_0_2_9
Not used: /home/builder/opt/libraries/m5stickcplus_0_1_0
Not used: /home/builder/opt/libraries/m5station_0_0_1
Error during build: exit status 1