Your shopping cart is empty!
RBT Auto Plant Watering Kit Project - Not Enough Water!
- Hao Zhen Goh
- 18 May 2022
- Tutorial
- Beginner
- 669
Nooooo, my plant is dying because I didn't refill the cup of water eventhough I turned on the auto plant watering system for days! What should I do?
Have you experienced this after completing the RBT Auto Plant Watering Kit? Let’s program it so that your REKA:BIT will tell you to refill the water when the water is running out.
Hardware and Software Preparation
You will need to own a complete set of RBT Auto Plant Watering Kit. But if you haven’t tried the RBT Auto Plant Watering Kit, select one of the options below to find out more!
If you already owned the RBT Auto Plant Watering Kit, then you may just skip the Hardware and Software Preparation section.
Refer to the Lesson Guide provided or click here to download the PDF version of the Lesson Guide in order to setup the entire project kit.
What does the code do?
- Have a variable to store the information about the number of times of watering the plants.
- Able to add the number of times of watering the plants.
- Notify you (in words/sound/RGB) to refill the water bottle when the number of times of watering the plants exceeds a certain amount.
How Many Times It Can Water?
First, we will have to find out how many times the auto plant watering system can water the plant for one cup of water.
- Create a new project and give it a special name.
Note: Remember to add “REKA:BIT” under extension.
- Add the following blocks to your code.You can find those blocks in the category drawer according to their respective colours.
- Flash the codes to your REKA:BIT.
Note: Remember to Connect your REKA:BIT to your computer by using the USB cable.
- Fill the cup with water.
- Insert the water pipe with a servo motor into the soil.
- Press Button A to water the plant.
- Repeat Step 6 to water the same plant or multiple plants until the water cup is empty.
- How many times that Button A is pressed? Jot it down, that will be the maximum number of times the auto plant watering system can water the plant for one cup of water.
Not Enough Water!
Now you know the maximum number of times the auto plant watering system can water the plant for one cup of water. By using the same project file as Lesson 5 or create a new project file…
- Create two new variables and name it “Number” and “Maximum Number of Times”.
- Add the following blocks to your code.You can find those blocks in the category drawer according to their respective colours.
- Insert the value “Maximum Number of Times” the auto plant watering system can water the plant for one cup of water, For example, “5”.
- Insert the water pipe with a servo motor and Maker Soil Moisture Sensor into the soil.
- Observe what happens when the cup of water is empty after watering the plant for a few times.
How does the code work?
Hope you enjoy playing around with this project kit. Thank you.
You are encouraged to further improve the code for higher efficiency and more advanced applications.