Soil Moisture Sensor - Troubles!

If im not mistaken a digital pin can only read and write an output/input of high or low. So what that meens, is that it can tell wether there is any tempiture/moisture or not...that thresh hold is most likely predefined by the hardware.

Another iconcisity that i found was the moistureDO was set equal to 31...or the 31st pin. depending on what type of arduino your using most dont even have a 31st pin there for when it tries to read it there is no pin and comes back with zero.

I would try to set the the moistureDO equal to pin 2

hope this helps

Hmm, even after chaing it to "const int moistureDO = 2" the digital read out ALWAYS reads 1, regardless of how tuned the potentiomiter is. The sensor it self lights up when powered (green led) and when in a moist enviroment a second lights up (red led) but nothing seems to be getting to the arduino.