soil moisture sensor

Hi I am new to Arduino and am on my first solo project. I have built a circuit that lights up an LED when the moisture sensor probes detect low moisture levels. I'm Struggling to write the code, and cannot find any other projects similar to mine, any guidance?

thanks in Advance

Can we see the schematic and whatever code you’ve attempted?

I assume you’ll need a voltage divider (two resistors) where one of the resistors is the soil sensor.

Then connect the voltage divider’s output to an Arduino analog-input. Then, you should be able to correlate the ADC reading to moisture level.

You can use if-statements to make your code do something different (or turn-on an LED, etc.) if the moisture is too high or too low.

webbo: cannot find any other projects similar to mine

What's so much different with your project than with projects you can find at Google using the search words "arduino moisture sensor"?

I'm at work currently so don't have access to my code or schematic but 'ive hooked up the output of the sensor to A0 and an led to digital pin 13 on my uno, the ;light on the sensor light up when the probe is in water, but not the separate LED, I have only found one schematic similar to mine, and it does the same thing as mine. I can'y find any tutorials that are working towards the same goal as I am, I will upload my code once I havea chance to Thanks guys.

the image at this link is pretty similar to my schematic. there are four pins on the sensor in order from left to right VCC GRND Digital Output Analog Output. I'm using the analog output for obvious reasons,

webbo: I'm using the analog output for obvious reasons,

So the 'hardware circuit' actually used and your 'code' and your 'obvious reasons' seem to be "for mind-readers only".

I'm sorry that I must tell you: I'm NOT a mind-reader.

And after reading your last two messages, I still don't understand what's so different that you "cannot find any other projects similar" as you wrote in the initial posting.

Especially as you already found at least one other project similar to yours at

English is not my mother language. Perhaps this is the reason why I have problems understanding what you really want and expect. So I'm still clueless about your problem. And therefore I'm out now.

Perhaps ask a mind-reader or somebody else who can understand your problem better than I can.