Back to Parent

Outcome

  • Demo

After hours of building and coding, I was able to get the prototype to work as planned. The video that welcomes you to this documentation page demonstrates how the system works. As you can see, when I remove the moisture sensor from soil; forcing the sensor to detect low-moisture, and wave my hand in front of the PIR sensor the LED flashes. 

When I wave my hand for the second time, the LED doesn't immediately flash because the system has to wait for a while before flashing again. For demonstration purposes, I set that the amount of wait time to be pretty low but practically it should at least be 5 minutes. 

  • Code

The code above demonstrates the looping behaviour of the set-up. It first checks all the plant sensors and changes the necessary variables that correspond to the readings. After that, it looks for a signal from the PIR sensor for movement which turns the boolean pirState true if there's movement around the plant. 

To avoid bombarding the residents with colourful notifications as they move around their homes, I added a timer functionality to the code. The Neopixel only flashes when a certain time has passed and the PIR senses movement. If both conditions are met, the code checks the results of the readings and sets the booleans; tempAlert, soilAlert and brightnessAlert, to true if needed. Then the code checks if any of these set to true and flashes the colours that correspond to each warning.  

  • Connect

To display that the system can be connected to the internet for added features, I created an IFTTT warning for the room temperature reading. This way if the system gets a temperature reading lower than 55 degrees, the user gets a down-to-earth e-mail from their plant asking them to move it somewhere else. You can view the e-mail I got while trying out this feature. 

  • Final Components List:

1x Particle Argon

1x PIR Motion Sensor

1x Soil Moisture Sensor

1x TMP36 Temperature Sensor

1x Photoresistor

1x Red LED

1x RGB Smart Neopixel

1x 10nF Ceramic Capacitor

1x 1okΩ resistor

1x 1kΩ resistor


Content Rating

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

0