Due to my bed room being disconnected from the central heating in my house, the temperature in my room often times becomes unregulated and humid. To counter the lack of natural airflow in my room I keep my windows open. Since my windows are usually open constantly when I'm sleeping and when I'm outside of my room, there is a chance that it can start raining and water can seep into my room. This project will notify me when it starts to rain and can give me time to close my window.Circuitry
The circuitry for the water sensor is fairly straight forward. The positive and negative pins are connected to the 5v and ground power rails and the analogue output is connected to A0 of the Particle Argon.
The water level sensor is capable of detecting the level of a liquid but can also be utilized to detect water on the sensor. Using the water sensor can allow us to detect if it is raining if the sensor becomes wet when placed outside.
The LCD Screen will allow the analogue value of the water sensor to be more easily monitored and will allow us to determine a number in which we can set our threshold to.
The LCD screen can be very finnicky from time to time and may not always display the correct data. Ensuring that all jumper wires are in securely is crucial in order for the screen to display correctly.
The fundamental code for this project is and if and else statement that set a Particle Variable (A public variable that can be used outside of the Particle IDE) to 0 or 1 if the analogue value of the water sensor is greater than the threshold that determines if water is on the sensor or not. This Particle Variable can be used to notify us and will allow us to know if the water sensor detects rain without needing to constantly monitor the LCD screen.
IFTTT (If that then this) is a website and application that can monitor a Particle Variable and will cause something to happen depending on what the output of the variable is. Creating an applet on the site that will check to see when the Particle Variable is 1 and call my phone accordingly can make a good notification for when rain is being detected.
A phone call is only one of the plenty notification methods somebody can use when IFTTT is triggered. A phone call can be a more audible method of notification and can allow a custom sound to be played when the Particle Variable is changed.