Professional Documents
Culture Documents
Methodology:
The system operates as follows:
• The soil moisture sensor continuously monitors the
moisture level in the soil.
• When the moisture level falls below a predefined threshold,
the microcontroller activates the water pump.
• The water pump dispenses water to the plants until the
moisture level reaches the desired level.
Future Work:
Future enhancements to the system could include:
References:
Appendices:
Technical Specifications:
void setup() {
pinMode(moistureSensorPin, INPUT);
pinMode(motorPin, OUTPUT);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
Serial.begin(9600);
}
void loop() {
int moistureLevel = analogRead(moistureSensorPin);
if (moistureLevel < dryThreshold) {
// Soil is dry, water the plant
digitalWrite(motorPin, HIGH);
delay(5000); // Adjust the delay as needed
digitalWrite(motorPin, LOW);
delay(5000); // Wait for 5 seconds before checking again
} else {
// Soil is wet, no need to water
digitalWrite(motorPin, LOW);
}
Additional Information: