Back to Parent

Process

1. We started by setting up the coding infrastructure. This was done using Particle IDE. We also had to verify that we could get data from the water sensor that measures water levels. Once we verified that this was possible, we had all the ingredients to ensure that we can code our product to achieve the desired goals.

2. We set up a bath tub with the water sensor. The water sensor reads water height and we coded 3 zones corresponding to "filling up", "reached target height" and "exceeded target height". Those zones send a web hook to IFTTT that communicates with WiZ (allows WiFi connection to lightbulb) within the Phillips Hue Lightbulb to change the color of the light to blue, green, or red, respectively. 

3. We checked that this worked and after testing the code and troubleshooting it, we were able to get the functionality to work as desired. We can also manually control the light color from a phone (using Phillips' WiZ connectivity).

The code used to program our product is shown at the end of the documentation.

Some of the main challenges included: finding a way for the water sensor to provide data, writing the code in Particle IDE to run the commands and that it could set up the 3 different colors, get Spotify to change the song as soon as the water level is reached.

Learnings: Configuring the web hook in a different platform, calibrating the sensor height to match the ruler, using multiple web hooks to trigger different functionalities within the light bulb, using IFTTT to connect Particle to Wiz (which controls the Phillips Lightbulb), working with optimizing the code to not publish too many events (only the main events when something changes).



Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0