We as humans have our duty to protect the plants. But in the today's world we all are busy in our work. But taking care of the plants is very necessary. So we need a system that continuously sends us data about the plants in our garden, school, colleges, etc.
So, the PLANT MONITORING SYSTEM here is such a device that sends us the intensity of light falling on our plants through SMS in our mobile phone so that we could know exactly what amount of light the plants are getting and accordingly plan where to plant the plants.
COMPONENTS USED1. Bolt IoT wifi module
2. LDR
3. Resistor 10K ohm
To get the data from the LDR sensor over Bolt cloud and view the light intensity values after every 5 mins by writing a JavaScript program and also notify the user through SMS using Twilio account if the intensity value goes against a given range of intensity value by writing a Python code.
BUILDING THE HARDWARE1. Connect one leg of the LDR to the 3V3 pin and the other leg in the A0 pin as shown-
2. Connect one leg of the the 10k resistor in the GND pin of the Bolt wifi module and the other leg in the A0 pin as shown-
NOTE-The GND leg of the resistor shouldn't touch the either 3V3 or 5V pin of the module.
3. Place the system near the plants.
NOTE-Checkthe connections properly and then turn On the power supply.
CODING PARTA) JavaScript
1. Login to cloud.boltiot.com
2. Create a product and give it a name and select Input Device and GPIO.
3. Select the recently created product and the select Configure tab at the top.
4. In the Hardware portion select the pin which is used in this case 'A0' and give a Variable Name and the save it by clicking the Save button on the top.
5. In the code portion give it a name in this case plant_monitor_data and select .js as the file extension. For more code information refer below in the CODE section.
6.Save this and Exit.
7. Finally link the product by clicking the Link button.
8. Go to the Device tab and click the View this device button.
9. Now we should wait for the sensor to get data and can be viewed as well as Downloaded by clicking the Download button. (Downloaded data in excel format is shown below)
B) Python
1. Login into the putty by entering the IP address of your digital ocean droplet.
2. After successful login, create a file named conf.py which will store all the credentials related to Twilio and Bolt cloud account. Code is given in the CODE section. Just replace your own credentials there.
3. Now create one more file named plant_monitor.py.
4. Here in the above coding we have set the maximum_limit=700 & minimum_limit=600. So, light intensity values can be viewed and as soon as the value goes below 600 or beyond 700 it notifies the user through SMS.
5. The outputs are shown below along with the SMS screanshot-













Comments