I opened the example Edgent_ESP8266 directly from withing Arduino IDE 2.0.1
I edited the main ino file with my Blynk setting as I have done several times in the past.
I uncommented the #define USE_WEMOS_D1_MINI as this matches the board I am using.
I get a compile error from a dependency file I have not edited, as follows:
from c:\Users\Gary\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
from c:\Users\Gary\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp8266_SSL.h:27,
from C:\Users\Gary\AppData\Local\Temp\.arduinoIDE-unsaved20221014-12036-1c9ask7.ehni\Edgent_ESP8266\BlynkEdgent.h:10,
from C:\Users\Gary\AppData\Local\Temp\.arduinoIDE-unsaved20221014-12036-1c9ask7.ehni\Edgent_ESP8266\Edgent_ESP8266.ino:18:
C:\Users\Gary\AppData\Local\Temp\.arduinoIDE-unsaved20221014-12036-1c9ask7.ehni\Edgent_ESP8266\ConfigStore.h: In function 'bool config_load_blnkopt()':
C:\Users\Gary\AppData\Local\Temp\.arduinoIDE-unsaved20221014-12036-1c9ask7.ehni\Edgent_ESP8266\ConfigStore.h:75:29: error: expected ',' or ';' before 'BLYNK_WIFI_SSID'
75 | BLYNK_PARAM_KV("ssid" , BLYNK_WIFI_SSID)
| ^~~~~~~~~~~~~~~
c:\Users\Gary\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:19:37: note: in definition of macro 'BLYNK_PARAM_KV'
19 | #define BLYNK_PARAM_KV(k, v) k "\0" v "\0"
| ^
exit status 1
Compilation error: expected ',' or ';' before 'BLYNK_WIFI_SSID' ```
No kidding. And you missed my point. I am compiling example code directly from the IDE. The “bug” is in a part of the code that I didn’t touch. I got the same result using a second machine to make sure that I didn’t fat-finger something. Should I have to correct the example code before compiling it? Who knows what else is missing?
Strange response to someone who is trying to help, maybe gnarlydog is an apt username.
I’m not aware of any issues with the Edgent examples, but the examples do change over time, and if you’d stated which version of the Blynk library you have installed - and therefore whether you’re using the latest example or not, then maybe someone would be willing to give it a try.
However, it’s probably best to post the .ino file from the sketch you’re trying to compile so that any issues caused by adding-in your credentials or un-commenting the board type can be identified.
I apologize to John93 for my rude response. I know you were just trying to help and I appreciate it. It’s no excuse, but I let me frustration get the best of me.
I figured out what I did wrong.
My error was copying and pasting more than I needed into the example file.
By copying and pasting the Blynk_Template_ID, Blynk_Device_Name AND Blynk_Auth_Token, rather than just Blynk_Template_ID and Blynk_Device_Name a section of code in one of the dependency files, ConfigStore.h became active at line 70 where it checks if BLYNK_AUTH_TOKEN is defined. I commented out the BLYNK_AUTH_TOKEN in the main .ino file and everything compiled as expected. However, I did provide the parameters that were missing in ConfigStore.h (BLYNK_WIFI_SSID,BLYNK_WIFI_PASS, and BLYNK_AUTH_TOKEN) during my debugging and still got a compile error. So there may still be a syntax error in the ConfigStore.h file if BLYNK_AUTH_TOKEN is defined in the main .ino file. Whomever manages that code may want to take a look at it.
Well, the idea is that you just creat a template when you’re using Edgent. Then you just have the Template ID and Device name to copy over you your sketch.
The device is created via the + Add Device option in the app, and the Auth token is allocated dynamically.
If you manually create a device from the template then you get the assigning Auth token line of code to copy, which screws-up the Edgent sketch, but as you’re not supposed to have an Auth token at the point when you create the Edgent sketch then the sketch doesn’t do any error checking for this scenario. Maybe something to think about in future, but as the person who maintains this code lives in the Ukraine, it’s probably not that high on his to-do list at the moment.