Hello everybody,
I am using a Soil Moisture Sensor FC-28, the connections are +5V, ground, pin A1 to analog and pin 12 to digital output, I am getting the results as it should be, but my question is about the output of DO.
I need to know if I can set the threshold value, it gives 1 or 0 depending on what value ? can I change it ?
and one last thing, I tried to search for its datasheet but I can't find it, I need to know its details, such as the numbers I get on the serial monitor, what are they exactly, I need to know its specifications such as the sensitivity, the error possibility, response time, the equation, etc.
Thanks in advance
const int moistureAO = 1;
const int moistureDO = 12;
int AO = 0;
int DO = 0;
int tmp = 0;
void setup (){
Serial.begin(9600);
Serial.println("Soil moisture sensor");
pinMode(moistureAO, INPUT);
pinMode(moistureDO, INPUT);
}
void loop ()
{
tmp=analogRead( moistureAO );
if ( tmp != AO )
{
AO=tmp;
Serial.print("A=");
Serial.println(AO);
}
tmp=digitalRead( moistureDO );
if ( tmp != DO )
{
DO=tmp;
Serial.print("D=");
Serial.println(DO);
}
delay (1000);
}