Skip to content

Grove - Moisture Sensor

Features

  • Soil moisture sensor based on soil resistivity measurement
  • Easy to use
  • 0cmX6.0cm grove module

Sketch

int sensorPin = A0;    
// select the input pin for the potentiometer
int sensorValue = 0;  
// variable to store the value coming from the sensor

void setup() {  
// declare the ledPin as an OUTPUT:   
Serial.begin(9600);  
} 

void loop() {  
// read the value from the sensor:  
sensorValue = analogRead(sensorPin);      
delay(1000);            
SerialUSB.print( "sensor = " );                       
SerialUSB.println(sensorValue);                  
}