top of page

Forum Comments

code wont compile as arduino uno code
In General Discussions
Ben PartiSi
Mar 11, 2021
Hi Dobromir, I did what you suggested and it still fails to compile. Here are is a screenshot of the new directory: and here is a shot of the IDE showing port grayed out when the Bittle is plugged in: here is a picture of Bittle plugged in: Bittle does make a buzzing noise a few seconds after its plugged in (not sure if bad board?) This is the error message after the directory move: Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno" In file included from C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:31:0: sketch\OpenCat.h: In member function 'void Motion::loadDataFromI2cEeprom(unsigned int&)': sketch\OpenCat.h:559:51: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom(DEVICE_ADDRESS, skillHeader); ^ In file included from sketch\OpenCat.h:85:0, from C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:31: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^~~~~~~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^~~~~~~~~~~ In file included from C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:31:0: sketch\OpenCat.h: At global scope: sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] }; ^ sketch\OpenCat.h:753:1: warning: narrowing conversion of '2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino: In function 'void setup()': C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:254:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] motion.loadBySkillName("rest"); ^ C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino: In function 'void loop()': C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:361:29: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] skillByName("rest"); ^ C:\Users\SOL_K\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:400:45: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] motion.loadBySkillName("calib"); ^ libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::I2Cdev()' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::I2Cdev()' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBytes(unsigned char, unsigned char, unsigned char, unsigned char*)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeByte(unsigned char, unsigned char, unsigned char)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeWords(unsigned char, unsigned char, unsigned char, unsigned int*)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeWord(unsigned char, unsigned char, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBytes(unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readByte(unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBit(unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBit(unsigned char, unsigned char, unsigned char, unsigned char)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readTimeout' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readWords(unsigned char, unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readWord(unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBitW(unsigned char, unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBitsW(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBitW(unsigned char, unsigned char, unsigned char, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBitsW(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here collect2.exe: error: ld returned 1 exit status Multiple libraries were found for "I2Cdev.h" Used: C:\Users\SOL_K\Documents\Arduino\libraries\I2Cdev Not used: C:\Users\SOL_K\Documents\Arduino\libraries\MPU6050 exit status 1 Error compiling for board Arduino Uno. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Content media
1
0
code wont compile as arduino uno code
In General Discussions
Ben PartiSi
Mar 11, 2021
Its a huge error list... I also notice that my arduino IDE does not see the port when the Bittle is plugged in. Here is the error: Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno" In file included from D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino:31:0: sketch\OpenCat.h: In member function 'void Motion::loadDataFromI2cEeprom(unsigned int&)': sketch\OpenCat.h:559:51: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom(DEVICE_ADDRESS, skillHeader); ^ In file included from sketch\OpenCat.h:85:0, from D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino:31: D:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^~~~~~~~~~~ D:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^~~~~~~~~~~ In file included from D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino:31:0: sketch\OpenCat.h: At global scope: sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] }; ^ sketch\OpenCat.h:753:1: warning: narrowing conversion of '2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] sketch\OpenCat.h:753:1: warning: narrowing conversion of '-2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino: In function 'void setup()': D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino:254:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] motion.loadBySkillName("rest"); ^ D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino: In function 'void loop()': D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino:361:29: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] skillByName("rest"); ^ D:\pittle\OpenCat-main\OpenCat-main\WriteInstinct\WriteInstinct.ino:400:45: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] motion.loadBySkillName("calib"); ^ libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::I2Cdev()' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::I2Cdev()' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBytes(unsigned char, unsigned char, unsigned char, unsigned char*)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeByte(unsigned char, unsigned char, unsigned char)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeWords(unsigned char, unsigned char, unsigned char, unsigned int*)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeWord(unsigned char, unsigned char, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBytes(unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readByte(unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBit(unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBit(unsigned char, unsigned char, unsigned char, unsigned char)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readTimeout' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBits(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readWords(unsigned char, unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readWord(unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBitW(unsigned char, unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::readBitsW(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int*, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBitW(unsigned char, unsigned char, unsigned char, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here libraries\MPU6050\I2Cdev.cpp.o (symbol from plugin): In function `I2Cdev::I2Cdev()': (.text+0x0): multiple definition of `I2Cdev::writeBitsW(unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)' libraries\I2Cdev\I2Cdev.cpp.o (symbol from plugin):(.text+0x0): first defined here collect2.exe: error: ld returned 1 exit status Multiple libraries were found for "I2Cdev.h" Used: C:\Users\SOL_K\Documents\Arduino\libraries\I2Cdev Not used: C:\Users\SOL_K\Documents\Arduino\libraries\MPU6050 exit status 1 Error compiling for board Arduino Uno. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
1
1

Ben PartiSi

More actions
bottom of page