Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with compiling code
01-31-2018, 03:02 PM
Post: #1
Help with compiling code
Hey everyone!
My robot is finished! Now I just need help with compiling the code! When I open up the code and try to verify it, I get errors like

'OSC_init' was not declared in this scope

And
MPU6050_setup was not declared in this scope

What am I doing wrong?

Thank you
Find all posts by this user
Quote this message in a reply
01-31-2018, 05:33 PM
Post: #2
RE: Help with compiling code
Looks like all the files are not located inside the same folder. The Arduino will look for them there. Extract all the *.ino files (B-robot_evo2.ino, control.ino...etc) into the same folder and try again
Visit this user's website Find all posts by this user
Quote this message in a reply
04-22-2018, 11:23 PM
Post: #3
RE: Help with compiling code
Hello,

I also need help with compiling the code.

I use IDE arduino 1.8.5, and the BROBOT_EVO2 file
// (BROBOT EVO 2 by JJROBOTS
// SELF BALANCE ARDUINO ROBOT WITH STEPPER MOTORS CONTROLLED WITH YOUR SMARTPHONE
// JJROBOTS BROBOT KIT: (Arduino Leonardo + BROBOT ELECTRONIC BRAIN SHIELD + STEPPER MOTOR drivers)
// This code is prepared for new BROBOT shield with ESP8266 Wifi module
// Author: JJROBOTS.COM
// Date: 02/09/2014
// Updated: 25/06/2017
// Version: 2.82
// License: GPL v2

when I compile the code the following errors appear : examples
\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:117:0: warning: "MPU6050_AUX_VDDIO" redefined

#define MPU6050_AUX_VDDIO MPU6050_D7 // I2C high: 1=VDD, 0=VLOGIC

\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:13:0: note: this is the location of the previous definition

#define MPU6050_AUX_VDDIO 0x01 // R/W

Do you have an idea of ​​the problem ?

Thanks
Find all posts by this user
Quote this message in a reply
04-23-2018, 05:06 PM
Post: #4
RE: Help with compiling code
uh... are you using the jjrobots libraries? the ones included in the zip file? compiling the MPU6050 librarie should not display those errors. Are you selecting Arduino Leonardo as BOARD in the Arduino IDE?
Visit this user's website Find all posts by this user
Quote this message in a reply
04-24-2018, 12:09 AM
Post: #5
RE: Help with compiling code
(04-23-2018 05:06 PM)JJrobots JP Wrote:  uh... are you using the jjrobots libraries? the ones included in the zip file? compiling the MPU6050 librarie should not display those errors. Are you selecting Arduino Leonardo as BOARD in the Arduino IDE?

Thank you for the answer.
Yes Leonardo is selecting in the Arduino IDE.

I found several ZIP, on from the site
--- https://www.jjrobots.com/wp-content/uplo...VO2_17.zip

and since the video youtude of the assembly of the robot
--- https://github.com/jjrobots/B-ROBOT

in the file it is written :
Updated: 25/06/2017
// Version: 2.82
// License: GPL v2
// Compiled and tested with Arduino 1.6.8. This new version of code does not need external libraries (only Arduino standard libraries)

Suddenly I do not understand, should I or not install the libraries?

Do you have another link to zip ?

Thanks
Find all posts by this user
Quote this message in a reply
04-25-2018, 10:17 PM (This post was last modified: 04-25-2018 10:58 PM by Vaygr.)
Post: #6
RE: Help with compiling code
(04-24-2018 12:09 AM)MacLolo Wrote:  
(04-23-2018 05:06 PM)JJrobots JP Wrote:  uh... are you using the jjrobots libraries? the ones included in the zip file? compiling the MPU6050 librarie should not display those errors. Are you selecting Arduino Leonardo as BOARD in the Arduino IDE?

Thank you for the answer.
Yes Leonardo is selecting in the Arduino IDE.

I found several ZIP, on from the site
--- https://www.jjrobots.com/wp-content/uplo...VO2_17.zip

and since the video youtude of the assembly of the robot
--- https://github.com/jjrobots/B-ROBOT

in the file it is written :
Updated: 25/06/2017
// Version: 2.82
// License: GPL v2
// Compiled and tested with Arduino 1.6.8. This new version of code does not need external libraries (only Arduino standard libraries)

Suddenly I do not understand, should I or not install the libraries?

Do you have another link to zip ?

Thanks

This GitHub link has the most updated files: https://github.com/jjrobots/B-ROBOT_EVO2

Click on the green button that says "Clone or Download". Click on "Download ZIP".

Extract all files into a folder.

Open the folder and go to Arduino > BROBOT_EVO2. You'll find 6 .ino files.

Double-click on BROBOT_EVO2.ino and it should open in the Arduino IDE. It will automatically load all the 6 .ino files in the same window.

In your Arduino IDE top menu, click on Tools > Board > select 'Arduino Leonardo'.

Use the USB cable to connect your Arduino Leonardo and click on the 'Upload' button. All files will be uploaded. Done!

You can optionally verify the code before uploading and it will not have any errors.
Find all posts by this user
Quote this message in a reply
04-27-2018, 03:33 AM
Post: #7
RE: Help with compiling code
I compiled with the new ZIP. There are always warnings but the upload has gone well and the robot is working.
thank you very much Vaygr
Find all posts by this user
Quote this message in a reply
04-27-2018, 04:07 AM (This post was last modified: 04-27-2018 04:12 AM by Vaygr.)
Post: #8
RE: Help with compiling code
(04-27-2018 03:33 AM)MacLolo Wrote:  I compiled with the new ZIP. There are always warnings but the upload has gone well and the robot is working.
thank you very much Vaygr

I'm glad that you finally got the robot to work. Have fun!

BTW, just out of curiosity, could you post the warnings or even better, copy and paste your entire compile log from your Arduino IDE when you verify?

Here is my log (i'm using the latest stable release Arduino IDE 1.8.5):
Code:
Archiving built core (caching) in: C:\Users\Vaygr\AppData\Local\Temp\arduino_cache_804273\core\core_arduino_avr_leo​nardo_b818964234206612c58ee256e29c8114.a
Sketch uses 22140 bytes (77%) of program storage space. Maximum is 28672 bytes.
Global variables use 1342 bytes (52%) of dynamic memory, leaving 1218 bytes for local variables. Maximum is 2560 bytes.
And as you can see, there are no errors. Wink
Find all posts by this user
Quote this message in a reply
04-27-2018, 04:57 AM
Post: #9
RE: Help with compiling code
(04-27-2018 04:07 AM)Vaygr Wrote:  
(04-27-2018 03:33 AM)MacLolo Wrote:  I compiled with the new ZIP. There are always warnings but the upload has gone well and the robot is working.
thank you very much Vaygr

I'm glad that you finally got the robot to work. Have fun!

BTW, just out of curiosity, could you post the warnings or even better, copy and paste your entire compile log from your Arduino IDE when you verify?

Here is my log (i'm using the latest stable release Arduino IDE 1.8.5):
Code:
Archiving built core (caching) in: C:\Users\Vaygr\AppData\Local\Temp\arduino_cache_804273\core\core_arduino_avr_leo​nardo_b818964234206612c58ee256e29c8114.a
Sketch uses 22140 bytes (77%) of program storage space. Maximum is 28672 bytes.
Global variables use 1342 bytes (52%) of dynamic memory, leaving 1218 bytes for local variables. Maximum is 2560 bytes.
And as you can see, there are no errors. Wink

The entire compile log

Quote:E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:117:0: warning: "MPU6050_AUX_VDDIO" redefined

#define MPU6050_AUX_VDDIO MPU6050_D7 // I2C high: 1=VDD, 0=VLOGIC

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:13:0: note: this is the location of the previous definition

#define MPU6050_AUX_VDDIO 0x01 // R/W

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:360:0: warning: "MPU6050_FIFO_EN" redefined

#define MPU6050_FIFO_EN MPU6050_D6

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:24:0: note: this is the location of the previous definition

#define MPU6050_FIFO_EN 0x23 // R/W

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino: In function 'void setup()':

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:245:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT", "OK", 1);

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:246:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+RST", "OK", 2); // ESP Wifi module RESET

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:248:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+GMR", "OK", 5);

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:273:37: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+CWQAP", "OK", 3);

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:274:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+CWMODE=2", "OK", 3); // Soft AP mode

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:276:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char *cmd = "AT+CWSAP=\"JJROBOTS_XX\",\"87654321\",5,3";

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:284:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+CIPMUX=0", "OK", 3); // Single connection mode

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:285:41: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+CIPMODE=1", "OK", 3); // Transparent mode

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\BROBOT_EVO2.ino:295:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

ESPsendCommand("AT+CIPSEND", ">", 2); // Start transmission (transparent mode)

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino: At global scope:

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\MPU6050.ino:463:1: warning: 'typedef' was ignored in this declaration

};

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\OSC.ino: In function 'void OSC_MsgRead()':

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\OSC.ino:208:67: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

OSC_MsgSend("/1/fader1\0\0\0,f\0\0\0\0\0\0", 20, 0.5);

^

E:\Laurent\Robotique\6 - pendule inverse\B-ROBOT_EVO2-master\B-ROBOT_EVO2-master\Arduino\BROBOT_EVO2\OSC.ino:221:67: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

OSC_MsgSend("/1/fader2\0\0\0,f\0\0\0\0\0\0", 20, 0.5);

^

Le croquis utilise 22140 octets (77%) de l'espace de stockage de programmes. Le maximum est de 28672 octets.
Les variables globales utilisent 1342 octets (52%) de mémoire dynamique, ce qui laisse 1218 octets pour les variables locales. Le maximum est de 2560 octets.

that's it, if it helps. thank you
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)