Having struggled with my project I have been researching the forums. I have rewrote my code to use timers and leave loop to timer and Blynk.run.
I’m switching to virtual pins not direct access and I want to use blynk.config not blynk.start so I can manage my connection.
When I try and use blynk.config I get a compile error though. I know it’s either my variable declarations or how I use the function. I don’t know C though and have drawn a blank via Google.
Relevant code looks roughly like
Char[] sever = xxxxxxxxxx
Char [] Auth = xxxxxxxxxx
Char[] said = xxxxxxxxxx
Char[] pass=xxxxxxxxxx
Void setup ()
{
Blank.connectWiFi(ssid, pass);
Blynk.config(Auth, server, 8080);
}
When I compile I get an error as Blynk.config seems to expect 4 arguments.
The compile error is
a reference of type “ESP8266 &” (not const-qualified) cannot be initialized with a value of type “const char *”
message: ‘argument of type “int” is incompatible with parameter of type “const char *”’
at: ‘140,30’
Blynk.config seems to want arguments (ESP8266 &esp8266, const char *auth, const char *domain, unit16_t port)
I don’t have the ESP8266 argument and don’t know what this is looking for me to pass.
It’s an Arduino mega 256 project with esp8266 attached. It’s a development board with h/w serial
I would be very grateful for any help, I have researched the forums and found out what I need to change on my project to improve my code but this issue is blocking me and I have been looking all evening. I didn’t find anything when I searched on this.
Thanks