Using Arduino board to connect from the analog A0-A0, Vcc-5 v, Gnd-Gnd
principle is to compare the resistance of the two legs will be translated from A To D is from 0-100%
If there is no measure will have a value of 0 if the humidity is below 30% will order Relay to work
Then the relay will order to the pump and solenoid valve , watering until the humidity up to 50%, it will stop the water.