Arduino Uno Soil Moisture Sensor

This project demonstrates how to use a soil moisture sensor with an Arduino Uno to monitor soil moisture levels.

The sensor's readings are mapped to a percentage value representing the moisture content, which is then displayed on the Serial Monitor.

Components Needed

Hardware Wiring Explanation:

VCC pin of the sensor: Connect to 5V on Arduino.

GND pin of the sensor: Connect to GND on Arduino.

Analog output pin of the sensor: Connect to analog pin A0 on Arduino.

Wire up the soil moisture sensor to the Arduino Uno as per the circuit setup section.

Software (Arduino IDE):

Open the Arduino IDE and create a new sketch.

Copy and paste the provided Arduino code into the sketch.

Upload the code to the Arduino Uno.

Project Operation

Open the Serial Monitor in the Arduino IDE (set the baud rate to 9600).

Observe the sensor value and moisture percentage readings.

Applications

Notes

Ensure proper calibration of the sensor to get accurate moisture readings.

Adjust the mapping function in the code if the sensor's range differs.

Regularly clean the sensor to prevent corrosion and ensure longevity.