Soil moisture
Soil moisture sensor
It provides Arduino IDE to write code & connect the hardware devices like Arduino boards & sensors. Soil Moisture sensor: A soil moisture sensor is used to measure the amount of moisture (Water content) present in the soil. Water monitoring is very important for a few crops
Code// Pin definitionint sensorPin = A0; // Analog pin connected to the sensor output
// Variable to store sensor valueint sensorValue = 0;
void setup() { // Start the Serial communication Serial.begin(9600);}
void loop() { // Read the sensor value sensorValue = analogRead(sensorPin);
// Print out the sensor value Serial.print("Soil Moisture Level: "); Serial.println(sensorValue);
// Add a delay for readability delay(1000);}
.jpeg)
.jpeg)
Comments
Post a Comment