i have mentioned both the BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME but i am still getting this error. i have tried everything so far till now but it is not working. i have given the code below so you guys ca have a look at it i am following a Youtube video for my project, in video he didn't got any error but when i tried the same code just added info about blynk template that i created i even have installed all the needed libraries. I want to link my BLYNK application with my IOT project to control it from my phone using blynk platform. i am stuck at this error from last two days. this is the error i a encountering #error "Please specify your BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME"
here is the code
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
#define sensor 33
#define relay 4
LiquidCrystal_I2C lcd(0x27, 16, 2);
#define BLYNK_TEMPLATE_ID "TMPL6emdmuXgp"
#define BLYNK_TEMPLATE_NAME "Plant watering System"
#define BLYNK_AUTH_TOKEN "***************************"
BlynkTimer timer;
char auth[] = "****************************";
char ssid[] = "Duaaa";
char pass[] = "*********";
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
lcd.init();
lcd.backlight();
pinMode(relay, OUTPUT);
digitalWrite(relay, HIGH);
.
.
.
.
}```
Your version of Blynk library may require these lines of code
#define BLYNK_TEMPLATE_ID "TMPL6emdmuXgp"
#define BLYNK_TEMPLATE_NAME "Plant watering System"
#define BLYNK_AUTH_TOKEN "***************************"
at the very top of your sketch.
Try adding these in the top most part of your code :)
Earlier versions of the Blynk library used BLYNK_DEVICE_NAME
rather than BLYNK_TEMPLATE_NAME
.
If you're still stuck and using an old format, try using BLYNK_DEVICE_NAME
instead of BLYNK_TEMPLATE_NAME