This is a project which notifies when the temperature exceeds the threshold value set by us. It is useful in industries where it is necessary to maintain a particular temperature. It can be also applied at our home. We will set the device and put a threshold value for it and make it notify if there is any increment in threshold. When there is any fire, as the temperature increases the threshold set by us, we will get notified through SMS alert to our mobile and sound through buzzer.
Demonstration of the project:Hardware SetupStep1:
- Hold the sensor in a manner such that you can read LM35 written on it.
- In this position, identify the pins of the sensor as VCC, Output and Ground from your left to right.
Step-2:
Connect the LM35 temperature sensor to the breadboard. Here VCC of LM35 is connected to orange wire, output to yellow wire and ground to green wire.
Connect the jumper wires as shown:
Now connect the jumper wires to pins of Bolt WiFi Module 1.VCC of LM35 sensor (which is connected to red wire through orange wire)- 5V Of Bolt WiFi Module 2.Output pin of LM35(which is connected to brown wire through yellow wire)-Analog Input pin(A0) of Bolt WiFi Module 3.Ground pin of LM35(which is connected to black wire through green wire)- GND of Bolt WiFi Module
Step-3:
Connect the shorter pin of Buzzer to common ground of LM35 that is parallel to the green wire which is connected to GND pin of Bolt WiFi Module through black wire.
The longer pin is connected to 0 pin of Bolt WiFi Module through another wire. (Here violet one)
The final circuit connections are as follows:
Get the device id
Get the api key
Twilio is a third-party SMS functionality provider. It is a cloud communications platform as a service (PaaS) company. Twilio allows software developers to programmatically make and receive phone calls and also send and receive text messages using its web service APIs.
To create an account on Twilio:
Step 1 - Open TwilioOpen www.twilio.com on your browser. Click on the “Sign up” to go to the Signup page.
Fill in the sign up form with your details. You will need to enter your first and last name, email ID and a 14 digit password.
Read and accept the checkbox for Terms of Service and Privacy policy of Twilio and then click on “Start your free trial”.
To start using Twilio’s services, you will need to verify your email address and your mobile number.
You will need to verify your email address first. Twilio will have sent an email to your inbox with a link to verify your email address. Read the email and follow the instructions given in the email to verify your email address.
Once you have verified your email address, you will then need to verify your mobile number. For this, in the next screen, enter your 10-digit mobile number and click on “Verify”. They will send an OTP to this number for verification.
Once you have received the OTP code on your mobile number, enter it on the screen and click on “Submit”.
Now, your account has been verified and you are now one step closer to sending SMSs via Twilio. Now, Twilio will onboard you once your mobile number has been verified.
Step 4 - Onboarding processFor the onboarding process, you will be asked a few questions on what you plan to do with the Twilio account. Since we will be using the Twilio account to send SMSs via Python code, we will choose the options accordingly.
Firstly, choose the option “Yes” when asked if you write code. Since we will be writing code to send SMS, this is applicable for us.
Now, in the next screen, click on Python as we will be writing the code in Python to send the SMS.
Choose the option “Use Twilio in a project” when asked for the question “What is your goal today?”
Select “Send or receive a SMS” when asked, “What do you want to do first?”
When you click on this option, you will then be redirected to the Twilio dashboard.
Step 5 - Get credentialsNow the onboarding process is completed, we now need to get the credentials for sending the SMS in our python code.
On the dashboard, search for the button “Get a trial number” and click on it. This should be highlighted for you if you have just completed the onboarding process. We need a trial number in order to send an SMS from Twilio.
When you click on the button, it will open a popup asking you to choose a number. Once you have finalised the number, click on “Choose this number”.
Now, we have all the credentials required to send an SMS via Twilio. On the dashboard, as highlighted in the picture below, you will need three items.
Your trial number is the “from number” you will be receiving the SMS from.
Your account SID and Auth token are highlighted. In order to view the Auth token, you may need to click on the “Show” button next to it.
Setting up VMWare Workstation and Ubuntu:VMWare Download link - https://my.vmware.com/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/12_0
Ubuntu Server ISO link - http://releases.ubuntu.com/16.04/ubuntu-16.04.6-server-i386.iso
Login to Ubuntu server and set up the Bolt Python Library: 1.Update the packages on Ubuntu
sudo apt-get -y update
2.Install python3 pip3 :
pip3 is a package manager for python3 used to install and manage packages and python libraries. It is system independent.
Install pip3 using the following command,
sudo apt install python3-pip
3.Installing boltiot library using pip
sudo pip3 install boltiot
Comments