|
Post by masterhawk on Mar 29, 2023 19:13:49 GMT -8
I was provided the link to download the Arduino IDE ESP32 Code for the SkyCam. I downloaded the files and used the Arduino IDE to compile the files to program an ESP32 CAM. when I started the compiler it gives a compliation error : right operand of comma operator has no effect [ Werror = unused-value]
Sketch left line 393 of the code highlighted which is
if (MQTTclient.connect(clientId.c_str()), MQTT_PORT, 120) {
I think that is the line of code that is causing the error, but I do not know how to fix this code written by SDL so that it will compile without errors using the current version of Arduino IDE and using AI Thinker ESP32 as board type. The code has not been modified by me. I just downloaded and tried to compile it. Any help in fixing this programming error would be appreciated.
Also when you click on the link to get to the files to download them there is a typo in the link. It directs you to
xhttps://github.com/switchdoclabs/SDL_ESP32_WeatherSenseSkyCam
so you can't just click on the link, you have to remove the x before you can get to the files.
TIA
|
|
|
Post by SDL on Mar 31, 2023 7:42:25 GMT -8
Typo fixed in link. Thank you!
Did you:
- To compile install esp32 boards in Arduino IDE
- Select AI Thinker ESP32 CAM as board type
I just downloaded it on my laptop and compiled it.
Post the error you get compiling.
BP
|
|
|
Post by masterhawk on Apr 2, 2023 4:16:36 GMT -8
Yes I did select the correct board as posted in the post above and the error given is posted above.
Compilation Error : right operand of comma opetator has no effect {Werror = unused-value]
apparently the issue is with the code on line 393 which is
if (MQTTclient.connect(clientId.c_str()), MQTT_PORT, 120) {
And I am using the most current compiler.
which version of the compiler did you use? Maybe they have made some changes so now the compiler gives an error?
|
|
|
Post by SDL on Apr 2, 2023 12:42:39 GMT -8
Date: 2022-11-17T11:52:49.821Z CLI Version: 0.29.0 [76251df9] Copyright © 2023 Arduino SA And here is a screen shot BP 
|
|
|
Post by masterhawk on Apr 2, 2023 13:07:52 GMT -8
thanks, for quick reply. I was just logging in to post that I re-downloaded the files and compiled them. This time it worked and successfully compiled using Arduino IDE 2.0.4. Thanks again
|
|