Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
Wow super
Here's the code:#define BLYNK_TEMPLATE_ID ""#define BLYNK_TEMPLATE_NAME ""#define BLYNK_AUTH_TOKEN ""#include #include char auth[] = ""; // Blynk Auth Tokenchar ssid[] = ""; // WiFi Network Namechar pass[] = ""; // WiFi Passwordint sensorPin = A0; // Soil Moisture Sensor Pinint relayPin = D0; // Relay Pinint threshold = 40; // Moisture threshold percentageBLYNK_WRITE(V3) { int buttonState = param.asInt(); Serial.print("Button state: "); Serial.println(buttonState); if (buttonState == 1) { digitalWrite(relayPin, LOW); Serial.println("Water pump turned ON"); } else { digitalWrite(relayPin, HIGH); Serial.println("Water pump turned OFF"); }}void setup() { Serial.begin(115200); Blynk.begin(auth, ssid, pass); pinMode(sensorPin, INPUT); pinMode(relayPin, OUTPUT); digitalWrite(relayPin, HIGH); Serial.println("Setup complete. Connecting to Blynk...");}void loop() { Blynk.run(); int moistureValue = analogRead(sensorPin); int moisturePercentage = map(moistureValue, 1023, 0, 0, 100); Blynk.virtualWrite(V2, moisturePercentage); Serial.print("Raw Sensor Value: "); Serial.println(moistureValue); Serial.print("Moisture Level: "); Serial.print(moisturePercentage); Serial.println("%"); if (moisturePercentage < threshold) { Blynk.logEvent("lowmoisture", "Low Moisture Detected!"); Serial.println("Low moisture detected, alert sent."); } delay(1000);}
Even after running the code I am getting an error in the 39th line which is telling me to specify the template ID and name. But I have verified it several times and it's always correct idk why it's showing error
How can we get the code?
plz give zip file
github.com/ElextroTime/SmartIrr
Use the GitHub Rep :)
Where is the code
@@Elextrolyte In code you set relayPin = D0 but in the vdo, u r showing to connect relay IN with esp8266 D1
Wow super
Here's the code:
#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME ""
#define BLYNK_AUTH_TOKEN ""
#include
#include
char auth[] = ""; // Blynk Auth Token
char ssid[] = ""; // WiFi Network Name
char pass[] = ""; // WiFi Password
int sensorPin = A0; // Soil Moisture Sensor Pin
int relayPin = D0; // Relay Pin
int threshold = 40; // Moisture threshold percentage
BLYNK_WRITE(V3) {
int buttonState = param.asInt();
Serial.print("Button state: ");
Serial.println(buttonState);
if (buttonState == 1) {
digitalWrite(relayPin, LOW);
Serial.println("Water pump turned ON");
} else {
digitalWrite(relayPin, HIGH);
Serial.println("Water pump turned OFF");
}
}
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, HIGH);
Serial.println("Setup complete. Connecting to Blynk...");
}
void loop() {
Blynk.run();
int moistureValue = analogRead(sensorPin);
int moisturePercentage = map(moistureValue, 1023, 0, 0, 100);
Blynk.virtualWrite(V2, moisturePercentage);
Serial.print("Raw Sensor Value: ");
Serial.println(moistureValue);
Serial.print("Moisture Level: ");
Serial.print(moisturePercentage);
Serial.println("%");
if (moisturePercentage < threshold) {
Blynk.logEvent("lowmoisture", "Low Moisture Detected!");
Serial.println("Low moisture detected, alert sent.");
}
delay(1000);
}
Even after running the code I am getting an error in the 39th line which is telling me to specify the template ID and name. But I have verified it several times and it's always correct idk why it's showing error
How can we get the code?
Here's the code:
#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME ""
#define BLYNK_AUTH_TOKEN ""
#include
#include
char auth[] = ""; // Blynk Auth Token
char ssid[] = ""; // WiFi Network Name
char pass[] = ""; // WiFi Password
int sensorPin = A0; // Soil Moisture Sensor Pin
int relayPin = D0; // Relay Pin
int threshold = 40; // Moisture threshold percentage
BLYNK_WRITE(V3) {
int buttonState = param.asInt();
Serial.print("Button state: ");
Serial.println(buttonState);
if (buttonState == 1) {
digitalWrite(relayPin, LOW);
Serial.println("Water pump turned ON");
} else {
digitalWrite(relayPin, HIGH);
Serial.println("Water pump turned OFF");
}
}
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, HIGH);
Serial.println("Setup complete. Connecting to Blynk...");
}
void loop() {
Blynk.run();
int moistureValue = analogRead(sensorPin);
int moisturePercentage = map(moistureValue, 1023, 0, 0, 100);
Blynk.virtualWrite(V2, moisturePercentage);
Serial.print("Raw Sensor Value: ");
Serial.println(moistureValue);
Serial.print("Moisture Level: ");
Serial.print(moisturePercentage);
Serial.println("%");
if (moisturePercentage < threshold) {
Blynk.logEvent("lowmoisture", "Low Moisture Detected!");
Serial.println("Low moisture detected, alert sent.");
}
delay(1000);
}
plz give zip file
github.com/ElextroTime/SmartIrr
Use the GitHub Rep :)
Where is the code
Here's the code:
#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME ""
#define BLYNK_AUTH_TOKEN ""
#include
#include
char auth[] = ""; // Blynk Auth Token
char ssid[] = ""; // WiFi Network Name
char pass[] = ""; // WiFi Password
int sensorPin = A0; // Soil Moisture Sensor Pin
int relayPin = D0; // Relay Pin
int threshold = 40; // Moisture threshold percentage
BLYNK_WRITE(V3) {
int buttonState = param.asInt();
Serial.print("Button state: ");
Serial.println(buttonState);
if (buttonState == 1) {
digitalWrite(relayPin, LOW);
Serial.println("Water pump turned ON");
} else {
digitalWrite(relayPin, HIGH);
Serial.println("Water pump turned OFF");
}
}
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, HIGH);
Serial.println("Setup complete. Connecting to Blynk...");
}
void loop() {
Blynk.run();
int moistureValue = analogRead(sensorPin);
int moisturePercentage = map(moistureValue, 1023, 0, 0, 100);
Blynk.virtualWrite(V2, moisturePercentage);
Serial.print("Raw Sensor Value: ");
Serial.println(moistureValue);
Serial.print("Moisture Level: ");
Serial.print(moisturePercentage);
Serial.println("%");
if (moisturePercentage < threshold) {
Blynk.logEvent("lowmoisture", "Low Moisture Detected!");
Serial.println("Low moisture detected, alert sent.");
}
delay(1000);
}
@@Elextrolyte In code you set relayPin = D0 but in the vdo, u r showing to connect relay IN with esp8266 D1