Benjamin M Ash
Published

Water Heater Tank Monitor

This system continuously checks the presence of water. If water is detected it will alert the owner via email.

BeginnerShowcase (no instructions)4 hours402
Water Heater Tank Monitor

Story

Read more

Schematics

The components

Its a simple water sensor and a particle photon.

Code

is there water?

C/C++
The code simply checks for an analog value that is output by the sensor. My IFTTT program monitors this every minute. If the analog output is above a certain threshold it will alert the owner. I also found a link that the allows for live monitoring of the sensor.
int H2O_sensor = 0;

void setup() {
  // variable name max length is 12 characters long
  Particle.variable("H2O_sensor", &H2O_sensor, INT);
  pinMode(A5, INPUT);
}

void loop() {
  // Read the analog value of the water sensor
  H2O_sensor = analogRead(A5);
  delay(1000);
}

Credits

Benjamin M Ash

Benjamin M Ash

1 project • 1 follower
im a student

Comments