# Water Leak Detector Two Wires

**URL:** <https://community.particle.io/t/water-leak-detector-two-wires/56222>\
**Category:** Tutorials\
**Created:** [May 18, 2020, 5:20pm UTC](https://community.particle.io/t/water-leak-detector-two-wires/56222 "2020-05-18T17:20:51Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![oraclerouter](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/oraclerouter/32/30494_2.png) [@oraclerouter](https://community.particle.io/u/oraclerouter)\
**Post date:** [May 28, 2020, 5:09pm UTC](https://community.particle.io/t/water-leak-detector-two-wires/56222/41 "2020-05-28T17:09:40Z")

</div>

Thanks for checking on this. I’m a beginner in electronics so I’m going by common sense a bit on this. Below is my code for the Argon, I have tested in different liquids and works great. Values are changing according to what I would expect. At the same time I’m not sure if I’m doing something “unsupported”.

```auto
int analogPin = A1;
int val = 0;          

void setup()
{
    pinMode(analogPin, INPUT_PULLDOWN);
    Particle.variable("Volt", val);
}

void loop()
{
    val = analogRead(analogPin); // read the input pin
    Particle.publish ("val", String(val));
    delay(1000);
}

```

---

<div class="post-metadata">

**Author:** ![ron7136](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@ron7136](https://community.particle.io/u/ron7136)\
**Post date:** [May 28, 2020, 6:05pm UTC](https://community.particle.io/t/water-leak-detector-two-wires/56222/42 "2020-05-28T18:05:07Z")

</div>

Tested on Argon, INPUT\_PULLDOWN works great! air=0 , skin contact = 20-40, water=1900.  
I have no need for the extra sensitivity 100k external pull down resister gives. This will simplify my moisture testing. Will have to test on soil next.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)\
**Post date:** [November 27, 2020, 6:05am UTC](https://community.particle.io/t/water-leak-detector-two-wires/56222/43 "2020-11-27T06:05:10Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.

[Previous page](https://community.particle.io/t/water-leak-detector-two-wires/56222.md?page=2)
