Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
converting a string constant to 'char*'
06-13-2019, 05:09 AM
Post: #1
converting a string constant to 'char*'
I cannot change the wifi name or password on an existing B Robot. I keep getting the following errors. This occurs on NEW downloads from GitHub. I am using most recent version of Arduino, have correct board and com port selected. Help?

Errors:
/Users/admin/BROBOT_EVO2/MPU6050.ino:117:0: warning: "MPU6050_AUX_VDDIO" redefined
#define MPU6050_AUX_VDDIO MPU6050_D7 // I2C high: 1=VDD, 0=VLOGIC
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:13:0: note: this is the location of the previous definition
#define MPU6050_AUX_VDDIO 0x01 // R/W
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:360:0: warning: "MPU6050_FIFO_EN" redefined
#define MPU6050_FIFO_EN MPU6050_D6
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:24:0: note: this is the location of the previous definition
#define MPU6050_FIFO_EN 0x23 // R/W
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino: In function 'void setup()':
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:233:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT", "OK", 1);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:234:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+RST", "OK", 2); // ESP Wifi module RESET
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:236:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+GMR", "OK", 5);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:261:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CWQAP", "OK", 3);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:262:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CWMODE=2", "OK", 3); // Soft AP mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:264:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char *cmd = "AT+CWSAP=\"BRUTUS_XX\",\"gofast\",5,3";
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:272:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPMUX=0", "OK", 3); // Single connection mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:273:41: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPMODE=1", "OK", 3); // Transparent mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:283:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPSEND", ">", 2); // Start transmission (transparent mode)
^
/Users/admin/BROBOT_EVO2/MPU6050.ino: At global scope:
/Users/admin/BROBOT_EVO2/MPU6050.ino:463:1: warning: 'typedef' was ignored in this declaration
};
^
/Users/admin/BROBOT_EVO2/OSC.ino: In function 'void OSC_MsgRead()':
/Users/admin/BROBOT_EVO2/OSC.ino:208:67: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
OSC_MsgSend("/1/fader1\0\0\0,f\0\0\0\0\0\0", 20, 0.5);
^
/Users/admin/BROBOT_EVO2/OSC.ino:221:67: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
OSC_MsgSend("/1/fader2\0\0\0,f\0\0\0\0\0\0", 20, 0.5);
^
Sketch uses 21822 bytes (76%) of program storage space. Maximum is 28672 bytes.
Global variables use 1300 bytes (50%) of dynamic memory, leaving 1260 bytes for local variables. Maximum is 2560 bytes.
Find all posts by this user
Quote this message in a reply
06-13-2019, 02:27 PM
Post: #2
RE: converting a string constant to 'char*'
Which version of the Arduino IDE are you using? You should not have any problems if you compile the code from the 1.6.8 upwards (I just changed the SSID name of the network for a side project using the 1.8.9 and everything went fine. Check that. And do not use the Arduino WINDOWS APP from the MICROSOFT store :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
06-13-2019, 04:40 PM
Post: #3
RE: converting a string constant to 'char*'
(06-13-2019 05:09 AM)rnakoneshny Wrote:  I cannot change the wifi name or password on an existing B Robot. I keep getting the following errors. This occurs on NEW downloads from GitHub. I am using most recent version of Arduino, have correct board and com port selected. Help?

Errors:
/Users/admin/BROBOT_EVO2/MPU6050.ino:117:0: warning: "MPU6050_AUX_VDDIO" redefined
#define MPU6050_AUX_VDDIO MPU6050_D7 // I2C high: 1=VDD, 0=VLOGIC
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:13:0: note: this is the location of the previous definition
#define MPU6050_AUX_VDDIO 0x01 // R/W
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:360:0: warning: "MPU6050_FIFO_EN" redefined
#define MPU6050_FIFO_EN MPU6050_D6
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:24:0: note: this is the location of the previous definition
#define MPU6050_FIFO_EN 0x23 // R/W
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino: In function 'void setup()':
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:233:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT", "OK", 1);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:234:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+RST", "OK", 2); // ESP Wifi module RESET
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:236:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+GMR", "OK", 5);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:261:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CWQAP", "OK", 3);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:262:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CWMODE=2", "OK", 3); // Soft AP mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:264:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char *cmd = "AT+CWSAP="BRUTUS_XX","gofast",5,3";
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:272:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPMUX=0", "OK", 3); // Single connection mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:273:41: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPMODE=1", "OK", 3); // Transparent mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:283:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPSEND", ">", 2); // Start transmission (transparent mode)
^
/Users/admin/BROBOT_EVO2/MPU6050.ino: At global scope:
/Users/admin/BROBOT_EVO2/MPU6050.ino:463:1: warning: 'typedef' was ignored in this declaration
};
^
/Users/admin/BROBOT_EVO2/OSC.ino: In function 'void OSC_MsgRead()':
/Users/admin/BROBOT_EVO2/OSC.ino:208:67: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
OSC_MsgSend("/1/fader1\0\0\0,f\0\0\0\0\0\0", 20, 0.5);
^
/Users/admin/BROBOT_EVO2/OSC.ino:221:67: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
OSC_MsgSend("/1/fader2\0\0\0,f\0\0\0\0\0\0", 20, 0.5);
^
Sketch uses 21822 bytes (76%) of program storage space. Maximum is 28672 bytes.
Global variables use 1300 bytes (50%) of dynamic memory, leaving 1260 bytes for local variables. Maximum is 2560 bytes.
We are using the current version 1.8.9. Tried on both Mac and PC same result.
Find all posts by this user
Quote this message in a reply
06-14-2019, 01:05 PM
Post: #4
RE: converting a string constant to 'char*'
(06-13-2019 04:40 PM)rnakoneshny Wrote:  
(06-13-2019 05:09 AM)rnakoneshny Wrote:  I cannot change the wifi name or password on an existing B Robot. I keep getting the following errors. This occurs on NEW downloads from GitHub. I am using most recent version of Arduino, have correct board and com port selected. Help?

Errors:
/Users/admin/BROBOT_EVO2/MPU6050.ino:117:0: warning: "MPU6050_AUX_VDDIO" redefined
#define MPU6050_AUX_VDDIO MPU6050_D7 // I2C high: 1=VDD, 0=VLOGIC
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:13:0: note: this is the location of the previous definition
#define MPU6050_AUX_VDDIO 0x01 // R/W
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:360:0: warning: "MPU6050_FIFO_EN" redefined
#define MPU6050_FIFO_EN MPU6050_D6
^
/Users/admin/BROBOT_EVO2/MPU6050.ino:24:0: note: this is the location of the previous definition
#define MPU6050_FIFO_EN 0x23 // R/W
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino: In function 'void setup()':
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:233:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT", "OK", 1);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:234:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+RST", "OK", 2); // ESP Wifi module RESET
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:236:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+GMR", "OK", 5);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:261:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CWQAP", "OK", 3);
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:262:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CWMODE=2", "OK", 3); // Soft AP mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:264:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char *cmd = "AT+CWSAP="BRUTUS_XX","gofast",5,3";
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:272:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPMUX=0", "OK", 3); // Single connection mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:273:41: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPMODE=1", "OK", 3); // Transparent mode
^
/Users/admin/BROBOT_EVO2/BROBOT_EVO2.ino:283:38: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
ESPsendCommand("AT+CIPSEND", ">", 2); // Start transmission (transparent mode)
^
/Users/admin/BROBOT_EVO2/MPU6050.ino: At global scope:
/Users/admin/BROBOT_EVO2/MPU6050.ino:463:1: warning: 'typedef' was ignored in this declaration
};
^
/Users/admin/BROBOT_EVO2/OSC.ino: In function 'void OSC_MsgRead()':
/Users/admin/BROBOT_EVO2/OSC.ino:208:67: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
OSC_MsgSend("/1/fader1\0\0\0,f\0\0\0\0\0\0", 20, 0.5);
^
/Users/admin/BROBOT_EVO2/OSC.ino:221:67: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
OSC_MsgSend("/1/fader2\0\0\0,f\0\0\0\0\0\0", 20, 0.5);
^
Sketch uses 21822 bytes (76%) of program storage space. Maximum is 28672 bytes.
Global variables use 1300 bytes (50%) of dynamic memory, leaving 1260 bytes for local variables. Maximum is 2560 bytes.
We are using the current version 1.8.9. Tried on both Mac and PC same result.
try using this CODE: https://www.jjrobots.com/wp-content/uplo...T_EVO2.zip
Visit this user's website Find all posts by this user
Quote this message in a reply
06-14-2019, 06:13 PM
Post: #5
RE: converting a string constant to 'char*'
New code same results (same error messages)
Find all posts by this user
Quote this message in a reply
06-19-2019, 09:21 AM
Post: #6
RE: converting a string constant to 'char*'
Those are warnings not errors. The program compiles and runs.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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