I think a pullup resistor on the input pin, with a Gnd wire nearby, would be better.
Signal would read high until water allowed the contact with the Gnd wire.
Experiment with digitalRead and with AnalogRead.
I think a pullup resistor on the input pin, with a Gnd wire nearby, would be better.
Signal would read high until water allowed the contact with the Gnd wire.
Experiment with digitalRead and with AnalogRead.