Alright, so I broke down and bought two resistive sensors from amazon. The come with the dedicated circut that has a potentiometer, and comparator, and both analog and digital output pins.
I've confirmed the function of teh sensor as this: Digital Out Pin is either On or Off. When the sensor is wet, it's 0v, when it's dry it's 3.3v Analog Out Pin is a floating variable of voltage measurement after applied resistance. 0v when it's dry, but the deeper the probes go into the water, the less resistance, thus higher voltage result. To me, this is the most accurate reading (as opposed to digital out) as it's a real time variable, not just a static result....
My challenge: How do I attach this Analog Out Ping to a GPIO pin to get a reading of the voltage? A multimeter tells me all the values are as they should be on my wires... the issue is my respberry pi is not getting any values during the reading. It either stays at 0.00, or displays no value at all, depending on the hardline line configuration I'm testing it with..
I've tried ReadInput pin, analogdigital, and various configurations to no avail.
Thanks in advance.
Any ideas why when I change from INV to DIR, it makes no difference?
Right now, that is the problem I have. My pin reads 101 when dry, 1 when wet, which from what I understand about your autowatering logic is going to cause problems...
Maybe I'll take a peek at the source code and invert it though - but I'd still like to understand how it's possible that INV or DIR produce the same result. It does not INVERT the result as one would expect..
Thanks.