This is a schematic and code for creating a 555 based soil-moisture-sensor based on the resistance of the soil.