MOISTURE SENSOR

CODE:

#include<maker_moisture.h>


int main()
{


init();
Serial.begin(9600);

 

while(1)
{

Serial.print(“Moisture value is”);
Serial.println(maker_getMoistureValue(A0));
delay(1000);

}
return 0;

}

Soil moisture sensor can be used for measuring soil moisture and it can be used for making smart flowerpot. It is highly sensitive and very responsive and this allow us to do some quick measurements. Sensor consists out of two probes and they allow electric current to pass through the soil and it gets resistance value to measure the moisture value.

VCC – power supply pin (5V)

GND – ground pin (0V)

8 – input analog pin

Coded by: