Surilli
Published © LGPL

Water and Monitor the Plant You Love; Surilli Meets Blynk!

Monitor the conditions (Hum, Temp, Soil Moisture & Light) in which your plant in growing & take necessary actions from anywhere, anytime.

BeginnerFull instructions provided1 hour1,995
Water and Monitor the Plant You Love; Surilli Meets Blynk!

Things used in this project

Hardware components

Surilli WiFi
Surilli WiFi
×1
SparkFun Soil Moisture Sensor (with Screw Terminals)
SparkFun Soil Moisture Sensor (with Screw Terminals)
This is not the one we used but any other moisture sensor that comes with ADC will work.
×1
Photo resistor
Photo resistor
LDR module with digital output D0 should be used.
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
Li-Ion Battery 1000mAh
Li-Ion Battery 1000mAh
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Story

Read more

Code

Arduino Sketch BlynkPlant

C/C++
#include <dht.h>
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>


#define dht_apin 13 // Analog Pin sensor is connected to  
dht DHT;

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "********************************";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "SSID";
char pass[] = "PASSWORD";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  Serial.begin(9600);
  pinMode (0, OUTPUT);
  pinMode (12, INPUT);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}

void loop()
{
  Blynk.run();
  Blynk.syncAll();

}

BLYNK_WRITE(V0)  // button attached to Virtual Pin 0 in SWITCH mode
{
  int i = param.asInt();
  Serial.println(i);
  if (i == 1) {
    digitalWrite(0, LOW);
  }
  else {
    digitalWrite(0, HIGH);
  }
}

BLYNK_READ(V2)
{

  WidgetLED led1(V6);
  WidgetLED led2(V7);
  WidgetLED led3(V8);
  WidgetLED led4(V9);
  led1.off();
  led2.off();
  

  //  TEMP AND HUMIDITY
  DHT.read11(dht_apin);
  char H = (char(DHT.humidity));
  char T = (char(DHT.temperature));

  //  MOISTURE SENSOR READINGS
  int sensorValue = 0;
  sensorValue = analogRead(A0);
  int soilMoisture = 100 - ((sensorValue * 100) / 1024);

  // LIGHT INTENSITY
  char* lightCondition;
  int ldrValue = digitalRead(12);
  if (ldrValue == 0) {
    lightCondition = "OPTIMUM LIGHT";
    led4.off();
  }
  else {
    lightCondition = "LOW LIGHT";
        led4.setValue(255);
    led4.on();
  }


  if (soilMoisture < 30 )
  {
    led3.setValue(255);
    led3.on();
  }
  else if (soilMoisture > 30) {
    led3.off();
  }

  Blynk.virtualWrite(V2, T);
  Blynk.virtualWrite(V3, H);
  Blynk.virtualWrite(V4, lightCondition);
  Blynk.virtualWrite(V5, soilMoisture);
  Blynk.virtualWrite(V1, 76);
  //  Blynk.virtualWrite(V6, 100);
}

Credits

Surilli

Surilli

196 projects • 64 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments