Hello! This is my very first time using Blynk and ESP32. I have hobbyist-level experience with Arduino.
I have bought this Arduino Nano ESP32-S3 board and I’m trying to connect to it with Blynk through wifi using Arduino IDE. I’m following the Quickstart tutorial on Blynk.Console. I got through the first four out of five steps successfully, but the last step (Device Activation) isn’t working correctly. Quickstart says I should be seeing messages in Arduino’s serial monitor relating to the board’s attempts to connect to wifi. I’m seeing no messages at all in the serial monitor.
I’ll try to give as much info about what I see and what I did up to this point.
- Arduino IDE 2.1.0
- I have downloaded the Blynk v1.3.2 Arduino library
- I have downloaded “Arduino ESP32 Boards” from Arduino’s Boards Manager
- I’ve chosen the correct board and COM port and uploaded the code to the board with no errors
- With no code loaded to the board, there’s a solid green light, flashing yellow light, and flashing rainbow light
- With the Quickstart code loaded to the board, I just see the green solid light
- In Quickstart, I chose “ESP32” for hardware and “wifi” for the connectivity type
- I have put the correct credentials for my local wifi network into the Quickstart code for the board
- After the code is loaded to the board and I unplug then replug the board into my Windows computer, I hear the “device connected” sound immediately followed by the “device disconnected” sound
This leads me to believe that Arduino isn’t even recognizing the board. In that case, I that wouldn’t be a Blynk issue, but I’m not entirely sure. I’m also a little unsure about whether this board will work with Blynk; but since it has an ESP32 chip, I assumed it would.
Does anyone have any ideas? If I didn’t provide any critical info, please let me know!
The Quickstart code (ESP32, wifi) that I flashed onto my board:
/*************************************************************
This is a simple demo of sending and receiving some data.
Be sure to check out other examples!
*************************************************************/
/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL2mM3vX1ls"
#define BLYNK_TEMPLATE_NAME "Quickstart Template"
#define BLYNK_AUTH_TOKEN "..."
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "...";
char pass[] = "...";
BlynkTimer timer;
// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
// Set incoming value from pin V0 to a variable
int value = param.asInt();
// Update state
Blynk.virtualWrite(V1, value);
}
// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
// Change Web Link Button message to "Congratulations!"
Blynk.setProperty(V3, "offImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
Blynk.setProperty(V3, "onImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
Blynk.setProperty(V3, "url", "https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}
// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V2, millis() / 1000);
}
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
// You can also specify server:
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);
// Setup a function to be called every second
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.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!
}