author
4CommentsJoined January 31st, 2016

Tell us about yourself!

Complete Your Profile
  • How to Use the Soil Hygrometer Module - Arduino Tutorial

    found this to work hope it helps others/* Arduino Tutorial - How to use a Soil Hygrometer Module Dev: Michalis Vasilakis // Date: 18/05/2016 // www.ardumotive.com *///Constants const int hygrometer = A0; //Hygrometer sensor analog pin output at pin A0 of Arduinoint pump = A1; //pump on off//Variables int value;int pumpvalue;void setup(){ pinMode (pump, OUTPUT); //SETS PIN A1 as output Serial.begin(9600);}void loop(){ // When the plant is watered well the sensor will read a value 380~400, I will keep the 400 // value but if you want you can change it below. value = analogRead(hygrometer); //Read analog value value = constrain(value,300,160); //Keep the ranges!value = map(value,300,160,100,0); //Map value : 400 will be 100 and 1023 will be 0pumpvalue = value;if (pumpvalue <...

    see more »

    found this to work hope it helps others/* Arduino Tutorial - How to use a Soil Hygrometer Module Dev: Michalis Vasilakis // Date: 18/05/2016 // www.ardumotive.com *///Constants const int hygrometer = A0; //Hygrometer sensor analog pin output at pin A0 of Arduinoint pump = A1; //pump on off//Variables int value;int pumpvalue;void setup(){ pinMode (pump, OUTPUT); //SETS PIN A1 as output Serial.begin(9600);}void loop(){ // When the plant is watered well the sensor will read a value 380~400, I will keep the 400 // value but if you want you can change it below. value = analogRead(hygrometer); //Read analog value value = constrain(value,300,160); //Keep the ranges!value = map(value,300,160,100,0); //Map value : 400 will be 100 and 1023 will be 0pumpvalue = value;if (pumpvalue < 1){digitalWrite(pump, LOW); // sets the pump off}else if (pumpvalue >= 99){digitalWrite(pump, HIGH); // sets the pump on} Serial.print("Soil humidity: "); Serial.print(value); Serial.println("%"); Serial.println ("pumpvalue:"); Serial.println(pumpvalue); delay(2000); //Read every 2 sec.}

    Hello again I'm trying to add a pump to this project operated via a relay on pin A1but I'm having problems with the value being stuck at 100% after adding the linesto switch the relay/* Arduino Tutorial - How to use a Soil Hygrometer ModuleDev: Michalis Vasilakis // Date: 18/05/2016 // www.ardumotive.com *///Constantsconst int hygrometer = A0; //Hygrometer sensor analog pin output at pin A0 of Arduinoint pump = A1; //pump on off//Variablesint value;void setup(){pinMode (pump, OUTPUT); //SETS PIN A1 as outputSerial.begin(9600);}void loop(){// When the plant is watered well the sensor will read a value 380~400, I will keep the 400// value but if you want you can change it below.value = analogRead(hygrometer); //Read analog valuevalue = constrain(value,300,160); //Keep the ranges!value = ...

    see more »

    Hello again I'm trying to add a pump to this project operated via a relay on pin A1but I'm having problems with the value being stuck at 100% after adding the linesto switch the relay/* Arduino Tutorial - How to use a Soil Hygrometer ModuleDev: Michalis Vasilakis // Date: 18/05/2016 // www.ardumotive.com *///Constantsconst int hygrometer = A0; //Hygrometer sensor analog pin output at pin A0 of Arduinoint pump = A1; //pump on off//Variablesint value;void setup(){pinMode (pump, OUTPUT); //SETS PIN A1 as outputSerial.begin(9600);}void loop(){// When the plant is watered well the sensor will read a value 380~400, I will keep the 400// value but if you want you can change it below.value = analogRead(hygrometer); //Read analog valuevalue = constrain(value,300,160); //Keep the ranges!value = map(value,300,160,100,0); //Map value : 400 will be 100 and 1023 will be 0// if (value = 0) digitalWrite(pump, HIGH); // sets the pump on// if (value = 100) digitalWrite(pump, LOW); // sets the pump offSerial.print("Soil humidity: ");Serial.print(value);Serial.println("%");delay(2000); //Read every 2 sec.}

    View Instructable »