Most people have one or more potted plants in their house that they need to water on a regular basis. The problem is that unless your a professional florist, you don't really know when each plant needs to be watered. To fix this problem we developed a system that sends you a notification on your phone when your plant is getting thirsty.
First, the moisture sensor was wired to the Photon and placed in the potted plant. The Photon was then programmed to publish an event called “moisturePercentage” when the sensor read a moisture level that was less than 20. Meanwhile, the Electron would subscribe to this event, and when it was published and would publish its own events called "plantStatus" and "handshake"; as well as change the value of a variable called thirsty from true to false. IFTTT would subscribe to “plantStatus” and send a notification to the user’s IFTTT app, while the Photon would subscribe to the "handshake" event and would stop publishing “moisturePercentage” when it heard it. In the electron code, there was a while loop that would cause its LED to start blinking while the variable thirsty=true. This provided another form of notification for the user in case they did not have their cell phone with them. When the plant was water, the moisture level would rise above 45 causing the Photon to publish another event called "plantWatered", which the Electron would subscribe to. This would cause the thirsty variable to be set to false, stopping the electron LED from flashing. After some time, the plant would absorb the water and the process would start all over again.
We decided that it would be interesting to see how the moisture level changed as the plant absorbed the water. So we used things speak to plot the moisture level every time the Photon recorded it. We found out that the blood-root plant we had chosen drank the water we gave it very quickly and would have to be watered at least once every other day.
Comments