Soil Moisture sensor

can any one plz tell me that what is the logic or calculation or formula behind getting the values like dry soil- 1024, wet soil - 0.... plzz rply fast

@ajrajput0995, you should read up on how a voltage divider works. Moisture sensors like this one, use the change in resistance to output a voltage according to the soil resistance (which is an indicator of moisture).

(I suggested to mods that this should maybe be a new thread?)