Sai charan
Published © GPL3+

Detection of Soil Moisture level

Using soil moisture sensor we need to detect the amount of moisture present in it. Led indicates the presence or absence of the level.

IntermediateFull instructions provided1 hour10,052
Detection of Soil Moisture level

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Gravity: Analog Soil Moisture Sensor For Arduino
DFRobot Gravity: Analog Soil Moisture Sensor For Arduino
×1
LED (generic)
LED (generic)
×1
USB Cable Assembly, USB Type A Plug to Micro USB Type B Plug
USB Cable Assembly, USB Type A Plug to Micro USB Type B Plug
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

10 Pc. Jumper Wire Kit, 5 cm Long
10 Pc. Jumper Wire Kit, 5 cm Long

Story

Read more

Schematics

Circuit for Soil moisture sensor

This gives the detailed connections of the sensor.

Code

Soil Moisture

C/C++
This senses the moisture level of the soil.
const int Pin=0;
const int limit=480;


void setup() {
  Serial.begin(9600);
  pinMode(13,OUTPUT);
  
  // put your setup code here, to run once:

}

void loop() {
  int value;
  value=analogRead(Pin);
  Serial.println("analog value:");
  Serial.println(value);
  delay(1000);
  if (value<limit)
  {
    digitalWrite(13,HIGH);
  }
  else
  {
    digitalWrite(13,LOW);
  }
  // put your main code here, to run repeatedly:

}

Credits

Sai charan

Sai charan

1 project • 1 follower
I am currently pursuing my third year Bachelor of Engineering in Electronics and Communication. I am Interested in building new projects .

Comments