This project helps you build a speech-assisted smart plant that responds to your voice commands.
It updates you with its moisture levels, and also to tell you if it needs to be watered or not.
• Cloudio - Raspberry Pi setup
• Moisture sensor (You can use any 3-pin moisture sensor of your choice)
(This project uses a bulb (connected to Cloudio through a relay) that lights up when Cloudio provides an update about the plant’s current state. This is entirely optional)
• Light bulb
Connect the moisture sensor to Port S2 of Cloudio as shown below.
Then, place the moisture sensor inside the pot such that the probes are buried into the soil.
Connect a relay to port X3 of Cloudio. Further, connect a bulb to it as shown.
Use the Voice block from the Advanced section to do this.
In the block's parameter area, press and hold the Record icon to set the voice trigger.
A bulb is turned on in response to the voice trigger.
This is done by using the Digital block to set a port to High.
(This port is connected to the bulb through a relay)
Next, the moisture levels are checked, and different actions performed based on whether the current level is above or below the desired threshold/trigger value.
An If block with a Moisture sensor is used to do this.
Be sure to set the right port in the Moisture block's parameter panel (depending on the port the sensor is connected to on Cloudio).
You can do this in the Value section of the Moisture block.
Use the Read function as a calibrating tool to set the ideal moisture threshold/trigger for the plant.
In this example, the trigger moisture level is set to 20%
This section takes care of Cloudio's behaviour when the moisture value is low.
Set the blocks and their parameters as below
The 'True' section and its contents are shown below.
To build the code for when the moisture level is high, enable the Else section of the If block in its parameter panel.
You can copy and paste the blocks from the True section and modify their parameters as below.
Upload the project
For this, once the project has been uploaded, press and hold the Record button to use the voice trigger set in Step 1 to query Cloudio for an update from the Smart Plant.