Smart Irrigation using ESP8266 and IoT | IoT plant monitoring system | IoT | Esp8266

  Рет қаралды 3,125

Elextrolyte

Elextrolyte

Күн бұрын

Пікірлер: 9
@Elextrolyte
@Elextrolyte Ай бұрын
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); }
@sgn79qed
@sgn79qed 3 ай бұрын
Wow super
@bhagyeshgunda9501
@bhagyeshgunda9501 Ай бұрын
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
@Dehcjemkeihhehu3709
@Dehcjemkeihhehu3709 Ай бұрын
How can we get the code?
@Elextrolyte
@Elextrolyte Ай бұрын
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); }
@basiltravellifeadventures1477
@basiltravellifeadventures1477 19 күн бұрын
plz give zip file
@prashanthv197
@prashanthv197 3 ай бұрын
Where is the code
@Elextrolyte
@Elextrolyte Ай бұрын
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); }
@mstprova8602
@mstprova8602 Ай бұрын
@@Elextrolyte In code you set relayPin = D0 but in the vdo, u r showing to connect relay IN with esp8266 D1
New Blynk IOT Smart Plant Monitoring System
16:54
Viral Science - The home of Creativity
Рет қаралды 411 М.
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 20 МЛН
UFC 308 : Уиттакер VS Чимаев
01:54
Setanta Sports UFC
Рет қаралды 838 М.
У вас там какие таланты ?😂
00:19
Карина Хафизова
Рет қаралды 13 МЛН
MY HEIGHT vs MrBEAST CREW 🙈📏
00:22
Celine Dept
Рет қаралды 93 МЛН
12 Useful & Interesting ESP32 Projects for Beginners!
9:41
ToP Projects Compilation
Рет қаралды 636 М.
How To Make Smart Plant Watering System With ESP8266 NodeMCU & New Blynk
10:52
Step-by-Step Tutorial: TFT Display with ESP8266
14:11
Mario's Ideas
Рет қаралды 2,4 М.
Forget About Raspberry Pi! Use Your Old Phone Instead. (Really???)
9:09
IoT Smart Energy Meter Using ESP32 & Blynk 2.0
11:16
Electro Gadget
Рет қаралды 7 М.
ESP8266 RFID Attendance System with Google Sheets
9:39
Viral Science - The home of Creativity
Рет қаралды 34 М.
Визитка программиста
19:40
Александр Красников
Рет қаралды 102 М.
I Made The Ultimate Cheating Device
9:39
ChromaLock
Рет қаралды 1,3 МЛН
2 MAGIC SECRETS @denismagicshow @roman_magic
00:32
MasomkaMagic
Рет қаралды 20 МЛН