3.8 Next Steps
Congratulations on completing the first Arduino-assisted home automation project in this book. You have already learned a lot of reusable ideas in this project. You programmed an Arduino, captured and processed data from a flex resistor, and sent emails with the help of a PHP-enabled web server and the Arduino Ethernet shield. We will be applying these concepts again in some of the other projects in this book.
The cool thing about designing and building your own projects is that they can each be tailored to your own exacting requirements. Prefer a tweet instead of an email alert when the water level exceeds the measurement threshold? No problem. Replace the email functionality with the code from the Tweeting Bird Feeder project later in this book. Want an overt visual indicator instead of an electronic message, something like a blockbuster action movie warning lamp that flashes on and off? Easy. Hook up a switch to the lamp that can be controlled to turn on and off at regular intervals with code lifted from the web-enabled light switch project.
Here are a few other ideas to further extend the use of a flex resistor in the home:
-
Use the variable analog data that is emitted from the resistor to determine not only when it has been flexed but also to what degree. This could be useful in a rain gauge application used to track incremental measurements of rainfall based on the deflection of the resistor by the buoyant bobber.
-
Add an hourly data transmission to the sketch and a routine in the PHP component to receive the message. Current bend values should be transmitted in this message as well. Check the values for anomalies, such as having no value (0) if it’s broken or something greater than 999 if there is a short circuit. Send an email alert when such threshold values are detected. Additionally, if the transmission isn’t received in a two-hour time frame, send an email informing the recipient of that fact. This enhanced monitoring will let you know that your hardware may be having issues and needs further attention.
-
Temperature variations may affect the calibration of the flex sensor. Attach a temperature sensor and dynamically change the trigger point values based on the surrounding ambient temperature readings.
-
Concerned about losing roofing tiles, shingles, or siding to the wind? Replace the bobber with a wind cup like those found mounted on weather stations sold by scientific instrument supply companies, set it up outside, and receive an email alert when the wind is becoming excessively strong.
-
If you use a flap door for your pet, anchor one end of the flex resistor to the flap frame and slide the untethered end into a small vinyl tube attached to the flap to allow the resistor to slide freely but still flex when the door flap is being pushed open on either end. Combine the sensor trigger with a web cam capture so you can verify that it’s your family pet coming in and out of the house and not some uninvited guest.