Document
Document
Document
Home Page
*/
//Include the library files
#include <LiquidCrystal_I2C.h>
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
BlynkTimer timer;
bool Relay = 0;
void setup() {
Serial.begin(9600);
pinMode(waterPump, OUTPUT);
digitalWrite(waterPump, HIGH);
lcd.init();
lcd.backlight();
lcd.setCursor(1, 0);
lcd.print("System Loading");
for (int a = 0; a <= 15; a++) {
lcd.setCursor(a, 1);
lcd.print(".");
delay(500);
}
lcd.clear();
if (Relay == 1) {
digitalWrite(waterPump, LOW);
lcd.setCursor(0, 1);
lcd.print("Motor is ON ");
} else {
digitalWrite(waterPump, HIGH);
lcd.setCursor(0, 1);
lcd.print("Motor is OFF");
}
}
Blynk.virtualWrite(V0, value);
lcd.setCursor(0, 0);
lcd.print("Moisture :");
lcd.print(value);
lcd.print(" ");
void loop() {
Blynk.run();//Run the Blynk library
timer.run();//Run the Blynk timer
}