Automatic Plant Watering System Using Arduino Uno
Automatic Plant Watering System Using Arduino Uno By Suman Majhi Coding Solution Introduction In this system, soil moisture sensor senses the moisture level of the soil. If soil will get dry then sensor senses low moisture level and automatically switches on the water pump to supply water to the plant. As plant get sufficient water and soil get wet then sensor senses enough moisture in soil. After which the water pump will automatically get stopped. Automatic plant watering system coding int WATERPUMP = 13; //motor pump connected to pin 13 int sensor = 8; //sensor digital pin vonnected to pin 8 int val; //This variable stores the value received from Soil moisture sensor. void setup() { pinMode(13,OUTPUT); //Set pin 13 as OUTPUT pin pinMode(8,INPUT); //Set pin 8 as input pin, to receive data from Soil moisture sensor. //Initialize serial and wait for port to open: Serial.begin(9600); // opens serial port, sets data rate to 9600 bps while (! Serial);// wait for serial port