Water Me, Seymour Attach a moisture sensor to Raspberry Pi Raspberry Pi will use Twitter to tweet when plant is dry or has just been watered. General Concept
Hardware Raspberry Pi Model B Rev. 2 Octopus Soil Moisture Sensor MCP3008 Analog to Digital Converter Jumper wires
Software This Pi uses the Pidora Linux distribution. Necessary packages are: WiringPi and Pi4J (the “J” is for “Java”) Java Developer Kit 7.1 Proprietary code for this project Eclipse Java EE (Developer Environment)
Proprietary Software and Code Programmed in Java. Java is object-oriented. Make several objects that perform smaller tasks Make them work together to accomplish something more complex
What Kind of Objects? Three main objects: MoistureSensor – Talks to MCP3008 A/D converter TwitterPost – Handles logging into Twitter and posting Driver – The brain of the project. Gets a reading from MoistureSensor at regular intervals and tells TwitterPost the appropriate time to tweet.
Driver Logic Every 1 minute, ask MoistureSensor for a moisture reading Based on the moisture level, establish if plant is dry or wet Plant must be in the same wet or dry state for 5 consecutive iterations before it tells TwitterPost to tweet