I am using at the time an ESP32S ( with esp WROOM), but I have exactly the same problem with an ESP32-DevKit (with esp WROOM) and with an ESP32-H2-Devkit M1
With the updated Espressif ESP32 3.x.x board configuration, I find the Blynk Edgent_ESP32.ino example does not compile.
Solutions is simple: insert this line BEFORE the #include "BlynkEdgent.h" statement #include "WiFi.h" // <============== I HAD TO ADD THIS TO BLYNK'S EXAMPLE FOR IT TO COMPILE
The updated Edgent_ESP32.ino Example is below. This has been working for me.
/*************************************************************
Blynk is a platform with iOS and Android apps to control
ESP32, Arduino, Raspberry Pi and the likes over the Internet.
You can easily build mobile and web interfaces for any
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: https://www.blynk.io
Sketch generator: https://examples.blynk.cc
Blynk community: https://community.blynk.cc
Follow us: https://www.fb.com/blynkapp
https://twitter.com/blynk_app
Blynk library is licensed under MIT license
*************************************************************
Blynk.Edgent implements:
- Blynk.Inject - Dynamic WiFi credentials provisioning
- Blynk.Air - Over The Air firmware updates
- Device state indication using a physical LED
- Credentials reset using a physical Button
*************************************************************/
/* Fill in information from your Blynk Template here */
/* Read more: https://bit.ly/BlynkInject */
//#define BLYNK_TEMPLATE_ID "TMPxxxxxx"
//#define BLYNK_TEMPLATE_NAME "Device"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#define APP_DEBUG
// Uncomment your board, or configure a custom board in Settings.h
//#define USE_ESP32_DEV_MODULE
//#define USE_ESP32C3_DEV_MODULE
//#define USE_ESP32S2_DEV_KIT
//#define USE_WROVER_BOARD
//#define USE_TTGO_T7
//#define USE_TTGO_T_OI
#include "WiFi.h" // <============== I HAD TO ADD THIS TO BLYNK'S EXAMPLE FOR IT TO COMPILE
#include "BlynkEdgent.h"
void setup()
{
Serial.begin(115200);
delay(100);
BlynkEdgent.begin();
}
void loop() {
BlynkEdgent.run();
}