Soil Moisture Sensor with Arduino

0
1909

Soil Moisture Sensor can be used with Arduino to make awesome Arduino projects like Automatic Watering to plants, water level indicator, rain alarm and much more.

This video will help you to connect soil moisture sensor to Arduino Uno. Write a program to take input from soil moisture sensor and do some task based on the data received from soil moisture sensor.

int led = 13;
int sensor = 8;
int val;

void setup() {
  pinMode(13,OUTPUT);
  pinMode(8,INPUT);
}

void loop() {
   val = digitalRead(8);
 
  if(val ==LOW)
  {
  digitalWrite(13,HIGH);
  }
  else
  {
  digitalWrite(13,LOW);
  }
  delay(400);
}

Download “Soil moisture sensor with Ardunio Source code” sensor.zip – Downloaded 280 times – 280 B

Required Material to make it yourself

How's this tutorial?
Easy4
Difficult2

LEAVE A REPLY

Please enter your comment!
Please enter your name here