If you don't have a Device Templates -> Create New Template or open an existing one
Copy the contents of this section and paste them to your sketch
Step 3: Getting Auth Token
Getting Auth Token
When the Template is ready, go to Search -> Devices - Create New Device
Choose a Template and give your new device a name
After the device was created, you will get the notification with TemplateID and AuthToken. Also, this info is always available in Device View -> Device Info
Now you have all the information you need to update your sketch:
Step 4: Updating sketch with Template ID and AuthToken
Add TEMPLATE_ID and AuthToken to your sketch:
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPL••••••••"
#define BLYNK_TEMPLATE_NAME "My First Device"
#define BLYNK_AUTH_TOKEN "••••••••••••••••••••••••"
#include <BlynkSimpleEsp32.h>
void setup()
{
Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, "your-wifi-ssid", "your-wifi-pass");
}
void loop()
{
Blynk.run();
}
Upload the sketch to your device and open Serial Monitor. Wait until you see something like this:
Blynk v.X.X.X
Your IP is 192.168.0.11
Connecting to...
Ready (ping: 40ms)