Analog Soil Moisture Sensors allow you to determine how dry soil is and then trigger an event such an LED turning , or a water pump being turned on.
Note: Give the sensor a few minutes to stabilize its readings.
Functional Parts in the Project:
- Arduino Uno – https://store.arduino.cc/usa/arduino-uno-rev3
- 560 Piece Jumper Wire Kit – https://amzn.to/2MsCLjL
- Soil Moisture Sensor – https://amzn.to/2jEDyjQ
#define soilSensor A0
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(soilSensor);
Serial.println(sensorValue);
delay(500);
}
Be the first to comment