Too dry and your plants will wilt. Too wet, and the roots will rot. So you're going to need a moisture sensor.The standard method in the hobbyist community seems to be a resistive sensor. You take two electrodes, e.g. two nails, put them in the dirt...