This project is the example of fire alarm system.Whenever the temperature exceeds the critical point then the buzzer starts and sends you the alert message about the temperature using 'Tiwilio'. The total project is done by using Bolt wifi module and using linux system(ubuntu).*Steps to build the project:-
*First take buzzer, connect positive leg to '0' pin and negitive one to'GND' pin.
*now take the temperature sensor, it have 3 pins.From left to right connect the pins accordingly-''3vs3, 'A0', 'GND'.
2.Now connect the Bolt wifi module to the power supply.
3.Now open the linux server(ubuntu), write the code mentioned below.*Steps to create the linux server:-
As I showed in by previous project, just like that you can create the linux server(ubuntu).
This is the link of my previous project and also check for the linux setup details.
- step 1:-First open BOLT Cloud account.And open API in it and make not of your API key and open device and you can find your bolt device id it look like "BOLTxxxx".
Next click on the copy button to copy your API key.
- step 2:-Now install the software which I gave(VMWarw and ubuntu server) and open it.If you find difficulty in how to install the software click on the link below:
Follow these steps to run your first Python program.
Step 1: Login to your Ubuntu server(Digital Ocean Droplet)
Step 2: Check Python version
Step 3: Create a Python File
Step 4: Run the python code
- Step 1: Login to your Ubuntu server(Digital Ocean Droplet)
First, connect to the Ubuntu server with your username and password, as we have learned in previous sections.
- Step 2: Check Python version
In Ubuntu 16.04 which is the version of Ubuntu installed on your Digital Ocean droplet, only Python-3 is available. To confirm the version of python, execute the command below on the terminal.
The above command would print the version of python as something similar to,
root@boltiot-learning-node:~# python3 --version
Now we will run the "hello world" program in Python. Let see how it looks like.
- Step 3: Create a Python File
First ssh into your Ubuntu server that you have deployed on Digital Ocean server and as I have mentioned in the previous section. We will use nano editor for writing the Python code because nano editor comes pre-installed with Ubuntu.
The command to be typed in the terminal to create a Python file is given below,
sudo nano filename.py
You may give any name as per your choice, however, make sure it ends with .py extension. In the below image, I am creating an empty python file with the filename "hello".
Press Enter key after you have typed the above command and it will open a nano editor for the hello.py file. You can write your Python code here.
After that it will open and write the code which I gave and press ctrl+x it will save the file.
- STEP 3:-Now type sudo python3 hello.py and see the magic.
before entering it the device should online(bolt wifi module).
Step 1: Open https://www.twilio.com/ in browser.
Step 2: Click on
Get a Free API Keybutton to sign up.
Step 3: Fill all the necessary details in SIGN UP form. Below is the screenshot of filled sign up form.
Step 4: To verify they will ask for your phone number. Choose India as an option in the dropdown and then enter your phone number.
Step 5: Click on "Products" as shown on the screen below,
Step 6: Now enable the SMS services by clicking on two checkboxes for Programmable SMS and Phone Numbers as shown below.
Once you have done this, scroll to the bottom of the screen and click on "Continue".
Step 7: Now, you will need to give a name for your project. I have given the name as My Project. Click on "Continue" once you have entered the project name.
Step 8: Click on "Skip this step" when it asks you to Invite a Teammate.
Step 9: Your project should be created at this point. Click on "Project Info" to view the account credentials which is required for your projects.
Step 10: You can view the Account SID and Auth token on this page. The Auth token is not visible by default, you can click on "view" button to make the Auth token visible as shown below. Copy both and save them somewhere securely.
Step 11: From the drop-down menu, choose "Programmable SMS". Now click on
Get Started button to generate phone number.
Step 12: Click on
Get a number button.
Step 13: Then a popup will appear. Click on
Choose this number button.
Step 14: Then a popup will appear which will have the final number. Copy this number and save to notepad for future references.
That's it. You have successfully created the account on Twilio. In the next lesson, we will use Bolt Python library to create our own SMS Alert system.