BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Esp32 error

Hey, im gettin this error when try to upload any sketch.
how can i resolve this?


Arduino: 1.8.12 (Windows 10), Placa:“ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None”

In file included from C:\Users\flavi\AppData\Local\Temp\arduino_modified_sketch_421438\blynkrfid222.ino:5:0:

C:\Users\flavi\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h: In member function ‘void BlynkWifi::connectWiFi(const char*, const char*)’:

C:\Users\flavi\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:37:14: error: ‘class WiFiClass’ has no member named ‘mode’

     WiFi.mode(WIFI_STA);

          ^

C:\Users\flavi\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:37:19: error: ‘WIFI_STA’ was not declared in this scope

     WiFi.mode(WIFI_STA);

               ^

C:\Users\flavi\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:39:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]

         WiFi.begin(ssid, pass);

                              ^

In file included from C:\Users\flavi\AppData\Local\Temp\arduino_modified_sketch_421438\blynkrfid222.ino:3:0:

D:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:79:9: note: initializing argument 1 of ‘int WiFiClass::begin(char*, const char*)’

 int begin(char* ssid, const char *passphrase);

     ^

In file included from C:\Users\flavi\AppData\Local\Temp\arduino_modified_sketch_421438\blynkrfid222.ino:5:0:

C:\Users\flavi\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEsp32.h:41:28: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]

         WiFi.begin(ssid);

                        ^

In file included from C:\Users\flavi\AppData\Local\Temp\arduino_modified_sketch_421438\blynkrfid222.ino:3:0:

D:\Program Files (x86)\Arduino\libraries\WiFi\src/WiFi.h:60:9: note: initializing argument 1 of ‘int WiFiClass::begin(char*)’

 int begin(char* ssid);

     ^

exit status 1
Erro compilando para a placa ESP32 Dev Module

Este relatório teria mais informações com
“Mostrar a saida detalhada durante a compilação”
opção pode ser ativada em “Arquivo -> Preferências”

The sketch would be useful.

Pete.

even with a basic example i get the same error.
but only with esp32.

What basic example are you referring to?

Pete.

Like this

#define BLYNK_PRINT Serial

#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";


char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

i tried to use Blynk.config. but doesnt works too.
and another example for WiFi library works

only with blynk i cant compile

That sketch compiles fine for me.

Sketch uses 639894 bytes (48%) of program storage space. Maximum is 1310720 bytes.
Global variables use 38912 bytes (11%) of dynamic memory, leaving 288768 bytes for local variables. Maximum is 327680 bytes.

What ESP32 core version are you using?

Pete.

DOIT ESP32 DEVKIT V1.

Im trying to reinstall the esp32 board library but everytime i get “CRC ERROR”.

That’s not the ESP32 core version.

What does your Board, Boards Manager, ESP32 entry say?

Pete.

Now it Works, the esp32 and wifi Library was the problem but i had CRC error everytime i tried to reinstall, even with clean instalation on a another PC.

I managed to install an older version of the library and after I updated it. solved it. thank you for your support!