1. Introduction :
This project is build to safeguard the plants or pet animals from sunlight and know about the current weather of the place while the person is outside the house.
It uses telegram application in which we need to generate a bot and a channel.
Most important thing is to make bot as administrator of that channel otherwise the bot will not be able to send the data to your channel on telegram.
You will require to import boltiot in your ubuntu or command prompt in windows
as we need to use python code in our project.
So, this LDR is used to check the light intensity of the surrounding area and when the light exceeds the set threshold value it generates a message on Telegram.
For any query you can ask me in comment section.
2. Demonstration of the project:
3. Alert notification on telegram:
4. Connections
Do the connections as shown in the images above.
1. Insert one lead of LDR into Bolt module's 3V3 Pin.
2. Insert other lead of LDR into A0 pin.
3. Insert one leg of 10k ohm resister into GND Pin.
4. Insert other leg of 10k ohm resistor into A0 pin.
Warning: 3.3V or 5V pins and GND pin should never touch each other.Create product on cloud and upload picture of circuit.
connect to bolt as Input Devices and GPIO.
In products section link the product to your bolt cloud.
ConfigurationFile
The python coding for this project has been done in Python IDLE. Before we start coding of the light alerting system in python, we need to make a configuration file which will have the specific keys for each user/device. We will import this file in our main code and use the various attributes. The advantage of this is that each user will only have to change the contents the configuration file to use the product.
The following is the configuration file (named as conf.py):
Go to the API section to know the API Key of your Bolt Cloud.
Install the Telegram App and sign in using your mobile number. Then follow the following steps to create a telegram channel and bot.
Inthe configuration file, enter the Telegram Bot ID (or token).
Now Its time to create a new bot:
Finally link the product on bolt cloud as guided earlier before execting the code of python..
Output Screenshots of Python Code::
Comments
Please log in or sign up to comment.