I’m trying a very basic test with Blynk 2.0 and an ESP32 in Platform IO. I have no problems connecting this ESP32 to my WiFi network under other circumstances, but it just hangs at the Blynk.begin() command. I’m at a loss here.
platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = blynkkk/Blynk@^1.0.1
main.cpp
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "xxx"
#define BLYNK_DEVICE_NAME "xxx"
#define BLYNK_AUTH_TOKEN "xxx"
char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "xxx";
char pass[] = "xxx";
void setup() {
// establish serial comms ...
Serial.begin(9600);
while(!Serial) {;} // wait for connection
Serial.printf("\n\nGreetings!\n");
Blynk.begin(auth, ssid, pass);
Serial.print("Blynk connected?: "); Serial.println(Blynk.connected());
}
void loop() {
Blynk.run();
}