Soil Moisture (Analog Sensor) The code reads analog pin values from the soil-moisture sensor and then prints the soil moisture in percentage to the terminal.