978-620-0-56221-0_IoT Bolt projects_.pdf

amitkumarkhg620 17 views 85 slides Jul 25, 2024
Slide 1
Slide 1 of 85
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85

About This Presentation

IoT based project


Slide Content








!"# $ !"# $











! !"#$%

&#"'! ('
)
*+" '##+*,-."


/ 0102'
/ 3-3- & # " ' !
(' )

IOT Bolt Projects
Pardeep Kumar
1
, Harpreet Kaur
2
,
Nikita Singh
3
1
B.E.E. Student, Chandigarh University,
2
Asst. Prof,
EED Chandigarh University,
3
BE-CSE Student,
Chandigarh University

[email protected]
1

[email protected]
2










1

Contents
1. Introduction about IOT…………….……….5
2. Introduction Bolt………………..……….6-15
2.1. How to Hold Bolt Module
2.2. Electronic Terminologies_1
2.3. Electronic Terminologies_2
2.4. Technical specification of Bolt Wifi
Module_1
2.5. Technical specification of Bolt Wifi
Module_2
2.6. Bolt Power ON
2.7. Bolt: Wifi module Indicator LED
3. Getting Started………………………….16-29
3.1. Register on Bolt Cloud
3.2. Communication of Bolt Device with Bolt
Cloud
3.3. Linking the Bolt Module to the Bolt
Cloud
4. Building First IOT Sensor Project ……...30-39
4.1. Introduction to Light Dependent Resistor
(LDR)
4.2. Introduction ADC with the Bolt WiFi
module
4.3. Hardware Connection
4.4. Creating Project
5. Controlling Device Over the Internet…..39-57
5.1. Basic HTML Programming
5.2. Basic JavaScript Programming
5.3. API on BOLT
2

5.4. Circuit Connection for an LED
5.5. Controlling LED Over Bolt Cloud
5.6. Pulse Width Modulation
5.7. Controlling LED Intensity Over Bolt
Cloud
6. Cloud, APIs, And Alerts…………………57-63
6.1. Virtual Private Server(VPS)
6.2. Introduction to Linu
6.3. Introduction to Python
6.4. Bolt Python Library
6.4.1.1. Controlling LED using Bolt
Python Library
7. Interfacing Sensor over VPS……………..65-75
7.1. Hardware Connection for Temperature
Monitor
7.2. Introduction to Twilio
7.3. Sending an SMS when Temperature
Crosses Threshold







3

Acknowledgement
I am deeply grateful to Asst. Prof Harpreet Kaur,
Head of department of Electrical Engineering
Chandigarh University for providing the requirement
and support through the project work.
I would like to acknowledge the tremendous scarifies
that my parents made to ensure that, I had an excellent
education. For this and much more, I am forever in
their debt. It is to them that I dedicated this Book. His
wide knowledge and logical way of thinking have
been of great value for me.










4

Introduction about IOT
The Internet of Things(IoT) can be defined as a
network of physical objects or people called "things"
that are embedded with software, electronics, network,
and sensors which allows these objects to collect and
exchange data.
The goal of IoT is to extend to internet connectivity
from standard devices like computer, mobile, tablet to
relatively dumb devices like a toaster. IoT makes
virtually everything "smart," by improving aspects of
our life with the power of data collection, AI
algorithm, and networks.
The thing in IoT can also be a person with a diabetes
monitor implant, an animal with tracking devices, etc.

Fig_1

5

2. Introduction Bolt
Bolt is an IoT platform to easily and quickly build
products and services. Bolt comes with a WiFi/GSM
chip and a cloud platform which helps you connect
your devices and sensors to the Internet. With Bolt
Cloud you can control and monitor them over the
internet, create personalised dashboards to visualise
the data, monitor the device health, run machine
learning algorithms and lot more. Build scalable IoT
systems in just a days time
Fig_2
6

2.1. How to Hold Bolt Module
Please hold the bolt module carefully without
touching the Black ESP8266 chip in the centre of the
device. You can hold the device to the corner show in
Fig.

Fig_3

Fig_4

7

Note: Don’t hold device like this:- Don’t touch the
black ESP8266 chip or apply a lot of pressure while
connecting or disconnecting wires from the pinouts of
the Bolt device.


Fig_5

Fig_6

8

2.2. Electronic Terminologies_1
INPUT & OUTPUT devices
For example Keyboard is the input device we
give information help of keyboard that’s
INPUT.
Speaker is the Output device we hear some
Information etc.
LED, Buzzer…etc is the OUTPUT device.
LDR, LM35…etc is INPUT device

Fig_7

Fig_8

9

2.3. Electronic Terminologies_2

GPIO (General Purpose Input / Output)
In bolt have 0-4 pins in GPIO means we use that’s
pins as a INPUT / OUTPUT its depend upon you any
pins we make a INPUT or any pins we operate as
OUTPUT, This pins operate Voltage 3.3v


Fig_9
ADC (Analog to Digital Converter)
ADC convert A to D (0-255 to 0-1), in bolt have 1
analog pin.
In TV, Computer understand only Binary value that’s
why need ADC to convert analog to digital value.

10

Fig_10
Communication Protocols
There have lots of protocols for different purpose for
example lots of language: English, Japanese, German,
Hindi…etc.
Communication Protocols: UART, SPI, 12C etc.
In bolt use UART (universal Asynchronous Receiver-
Transmitter) lots of programmer use UART for
interlink different Board.

2.4. Technical specification of Bolt Wifi
Module_1

In bolt device have a ESP8266 wifi
module is the heart of bolt module also
have a antenna for wifi, its connect to all
11

wifi system its need 2.4GHZ, ESP8266
run 80MHz, its need 3.3V only.


Fig_11

Bolt module need 5v adapter for supply
but we know about ESP8266 need 3.3V
why given 5v direct…?, because 5v
adapter easily available in market for
supply, in bolt connect a small transistor
to convert 5v to 3.3v

12

2.5. Technical specification of Bolt Wifi
Module_2
In a bolt have 4 GPIO pins, when simple person count
a pin say 5 GPIO pins, but when programmer count its
say 4 GPIO pins because pins start fro 0-4, GPIO pin
need 3.3V.
Voltage: 3.3 -> Binary(1) -> Level(HIGH)
Voltage: 0 -> Binary(0) -> Level(LOW)
When we talk about Light brightness need to use ADC
pin.
Digital Pin : 0V or 3.3V
Analog Pin : 0V to 1V
In Bolt have a two LED one is for Cloud led, second
is for Wifi led.

Fig_12

13

2.6. Bolt Power ON

Fig_13
Take USB connect to Adapter or Laptop or
other device.
First Connect USB to Bolt after that give
supply.

Fig_14
14

2.7. Bolt: Wifi module Indicator LED
First connect Power supply to BOLT
Blue “LED” Slowly- Slowly Blink, its means
Bolt Turn on HOTSPOT, when you connect to
your Android device or other device (more
hotspot near by device)Blue led Fast Blink,
after that stable its means Bolt connected.

Fig_15
When turn on Internet on your android device
Green led Turn on.
All are done by Bolt app ( download on Play-
store)

Fig_16
15

3. Getting Started

3.1. Register on Bolt Cloud
Step 1: Open www.cloud.boltiot.com on your web
browser (Google Chrome recommended) .
Step 2: Click on "SignUp” as shown below.

Fig_17
Step 3: Enter your details on the SignUp page shown
below. Enter your name, email id (login ID for Bolt
cloud), and password in the fields. Do confirm your
password by typing it again in the Confirm Password
field and then click on the Register button.
16

Fig_18
Step 4: Verification of your account: If you have
entered all the details correctly, you will be
successfully registered on Bolt Cloud and you shall
see the screen below.

Fig_19
17

You will be sent a Verification Mail to your mail Id as
seen below (Please check your Spam folder if the mail
is not found in your Inbox.
Open the mail and click on the “Click here to verify
your E-mail ID” button as shown below.

Fig_20
Once you click on the button, your email id will be
verified and you will be directed to the following page
thus completing the registration process on Bolt
Cloud.

Fig_21
18

Step 5: You will be redirected to your Bolt Cloud
Dashboard, with the Welcome message greeting,
where you can click on the Getting Started button to
view the guide.

Fig_22
Step 6: You will be given a basic tour of the Bolt
Cloud features on the Dashboard. You can click on the
Next & Back button to view the features. You can
click the Skip button to skip the tour if you wish to.
The tour can be taken anytime by clicking the “Take a
Tour” button at the top right corner of your dashboard.
Step 7: Once the tour is done you shall have the option
to add a Bolt device to you dashboard. The process of
linking your Bolt device to your Cloud Dashboard will
be covered in the next lesson.
19

Fig_23

3.2. Communication of Bolt Device with
Bolt Cloud
The communication of Bolt devices with Bolt Cloud
happens over the MQTT communication protocol.
MQTT stands for Message Queue Telemetry
Transport. But why do we need to have a protocol
such as MQTT for communication when HTTP &
HTTPS protocols are so popular and widely used for
communication? Although these protocols are
popular, the amount of overhead data that is sent over
the Internet for managing the communication is quite
a lot. Overhead data is the data which is sent along
with the actual message/data which conveys the extra
information required to understand the message/data
sent. The overhead data varies from protocol to
protocol.
20

Fig_24
Most IoT devices and sensors contain limited
processing capabilities and constrained Internet
bandwidth. Due to these limitations, they send data
over the Internet only when required and the data sent
is very low in terms of bandwidth usage. Hence using
protocols such as HTTP, HTTPS does not become
feasible where the overhead data is more than the
actual data itself. MQTT contains very low overhead
and hence becomes ideal for IoT communication.
MQTT is a pub-sub messaging protocol. Pub refers to
publishing and sub refers to subscribing. There is a
central entity, in our case, it is the Bolt Cloud. All the
Bolt devices connect to the Bolt Cloud and send the
data to various channels by publishing the data on
their unique channels. The Bolt devices also subscribe
to channels so that they can receive commands
coming from the Bolt users.
21

3.3. Linking the Bolt Module to the Bolt
Cloud
Step 1: Search for Bolt IoT in Google PlayStore or
Apple AppStore depending on your phone’s OS such
as Android or iOS and install the app. The app is only
available for Android and iOS devices

Fig_25
Step 2: Open the app, and enter the email id and
password to login to your Bolt Cloud account. This
will be same as the email ID and password that you
have used to sign up on cloud.boltiot.com. Once done,
click on the GO button to log in.
22

Fig_26
Step 3: Since you do not have any Bolt devices linked
to your Cloud account, you will find the “NO
DEVICES CONFIGURED” message on the screen
after login. To start the Bolt device setup process,
click on the "ADD DEVICE" button which is seen in
the screen below.

Fig_27
23

Step 4: The next few screens will guide you with the
setup process. First, power on your Bolt Module
provided in the kit, using a micro USB type android
charging cable. Next, once the Device is powered ON
the Blue LED on the ESP8266 Chip will start blinking
steadily. When this happens click "READY" button as
shown in the images below. You can swipe left to get
to the "READY" screen.

Fig_28

Fig_29
24

Step 5: At this point, the App will Ask you to Turn On
your device Location/GPS setting if it is turned off
and also to Turn Off your Mobile Data if it is switched
on.

Fig_30
Step 6: Once the location is turned ON, the mobile
phone will automatically connect to the Bolt Module's
Hotspot. This can be verified by checking that the
Blue LED's blinking rate is faster. At this point, the
app may tell you to switch off your mobile data if it is
On as seen below.

Fig_31
25

Step 7: Once you have turned Off your Mobile data
and your Bolt device is shown in the App as below
you can click on "CONTINUE" button once the check
mark appears on the screen.

Fig_32
Step 8: Next you have to connect the Bolt device to a
Wi-Fi Network which will be displayed by the app for
you to select from. Make sure that the Wi-Fi does not
have further verification code requirements except the
password. Ensure that the Wi-Fi operates at 2.4 GHz
and Not 5 GHz.


26

Ensure there are no ASCII characters beyond the
allowed range of 0-127 in your SSID or PASSWORD.
Please do not connect to the hotspot by the name of
"BoltXXXXX" i.e. the Bolt's own Hotspot

Fig_33
On clicking connect the Next steps will link the Bolt
to your account. Click on "SAVE" to link the Device
to your account. Finally, click on Done and it will take
you back to your Home page.

27

Fig_35
Now login to your cloud account on your laptop/PC.
You should now have the new device added to your
dashboard as seen below.

Fig_36
29

4. Building First IOT Sensor Project

4.1. Introduction to Light Dependent Resistor
(LDR)
Light dependent Resistor(LDR) is depend upon
the Light.
When light fall on LDR its mean Resistance
value is Change

Fig_37
Depend upon the Ohms law:


Fig_38
When Resistance change Voltage also change.

30

4.2. Introduction ADC with the Bolt WiFi
module
The Bolt WiFi module is designed around the
ESP8266 WiFi chip by the company Espressif and
uses its internal hardware for all of the functions of
the Bolt.
The ADC that comes inbuilt with the ESP8266, has
an input range of 0 to 1 volts, and an output range
of 0 to 1023.
The voltage reading given by the output of the
ADC can be given by the following formula.
Input Voltage = ADC output / 1024

4.3. Hardware Connection
Hardware Required
1x Bolt IOT Module
1x Micro USB
1x LDR
1x 10Ohm Resistor
There is no positive or negative for this and the 10k
Ohm resistor. Also, make sure the Bolt module is not
powered on while making connections. Always make
it a habit to power off the circuit while making
31

connections for your own and the circuit's safety.
Double-check all connections before turning it on.
Step 1: Insert one lead of the LDR into the Bolt
Module 3v3 Pin
Step 2: Insert second pin A0 pin
Step 3: Insert one leg of 10K Ohm Resistor into the
GND pin
Step 4: Insert the other leg of the Resistor also into the
A0 pin.

Fig_39
32

4.4. Creating Project
Open link: - “cloud.boltiot.com”
Sign IN

Fig_40
Click on Add Product

Fig_41

33

Enter Product name:- “*******”
Select Input Devices
Select GPIO
Click on Done

Fig_42
Click on “Link Devices”

Fig_43
Select your device
Click on Done
34

Fig_44
Your device display on Dashboard
Next click on a “Configure it”

Fig_45
Select a A0 pin
Add a variable name
Set a time how much time data update select as
per requiment.
Click on Save
35

Fig_46
Click on Code
Enter simple code “JavaScript” copy and paste

setChartLibrary('google-chart');
setChartTitle('Gauge Chart');
setChartType('gauge');
setAxisName('Pardeep');
setDimensions(400,400);
setMaxValue(1023);
setYellow(501,725);
setRed(726,1023);
setGreen(0,500);
setCrosshair(true);
plotChart('ldr');





36

Don’t forget to enter variable name “ldr” enter
in “plotChart(‘ldr’);”

Fig_47
Save a program
Click on “Deploy configuration”
Next click on “View this device”

Fig_48

37

New window appear show in fig
As per your program value show
Now my room light intensity value is 154

Fig_49
When More Light fall on a LDR value is
change after 30sec or 5 min as per your
program.

Fig_50
38

Hardware

Fig_51

5. Controlling Device Over the Internet
5.1. Basic HTML Programming

HTML stands for Hyper Text Markup Language. It is
used to design web pages using markup language.
HTML is the combination of Hypertext and Markup
language. Hypertext defines the link between the web
pages. Markup language is used to define the text
document within tag which defines the structure of web
pages. This language is used to annotate (make notes for
the computer) text so that a machine can understand it
and manipulate text accordingly. Most of markup (e.g.
HTML) languages are human readable. Language uses
tags to define what manipulation has to be done on the
text.
HTML is used to build a websites.
39

It is supported by all browsers.
It can be integrated with other languages like CSS,
JavaScript etc

Creating First Web page
Step:1 Open your text editor or using Notepad
Step: 2 Click on File create a new file
Step: 3 write a simple code

<!DOCTYPE html>
<html>
<head>
<title>****Pardeep****</title>
</head>
<body>
<h1>Thi is pardeep class</h1>
<p>This is a Biodata</p>
</body>
</html>

40

Fig_52
Step 4: Save file”*****.html”

Fig_53
Step 5: Open .html file where you save.
Step 6: Output

Fig_54
41

Next Web page
<!DOCTYPE html>
<html>
<body>
<h1>This is pardeep class_2</h1>
<p> Pardeep Biodata</p>
<a href="https://www.w3schools.com">This is study link</a>
</body>
</html>
When you run there have a link click on that’s lots of
programming you will learn easily.

Fig_55


42

Next Web page
<!DOCTYPE html>
<html>
<body>
<h1>This is pardeep class_3</h1>
<img src="deep.jpeg" width="400" height="400">
</body>
</html>
When you run your program Image show on window
Don’t forget to Replace Image “****.jpeg”

Fig_56

Fig_57
43

Next Web page
<!DOCTYPE html>
<html>
<body>
<h1>This is pardeep class_5</h1>
<button type="button" onclick="alert('Pardeep
kumar!')">press deep</button>
</body>
</html>

Fig_58


Fig_59
44

Next Web page
<!DOCTYPE html>
<html>
<body>
<h1>This is pardeep class_5</h1>
<br>
<form>
First Name:<br>
<input type="text" name="firstname"><br>
Last Name:<br>
<input type="text" name="Lastname"><br>
</form>
</body>
</html>

Fig_60
45

5.2. Basic JavaScript Programming
Variables in JavaScript
In the previous lesson, we learnt how to use JS code
along with HTML code to make web pages more
dynamic. But we did not see anything about how
powerful JS code is. In this lesson, we shall learn how
to use JS code evaluate arithmetic expressions, and
manipulate HTML content dynamically.
As you might have learnt in other programming
languages as well, variables are used to store data
values during the execution of a program. The
variables are used so that we can replace using direct
expressions such as 2+6 to x+y where x and y are
variables so that the same code can work for multiple
inputs by just changing the values stored in the
variables. We use the keyword var to define a variable
in JavaScript. var a = 20; , var b = "platform";
In the above example, the variable a stores the value
20 and the variable b stores the value "platform". It is
not required to define the variable
Here is the syntax for all the basic arithmetic
operations along with comments to describe
each line of code. We use the // characters to
add comments to JS code.
Save the code ins a file “.js” extension e.g.
“my-javascript.js”
46

Fig_61
Next Write code on HTML
In html coding write “.js”file name show in Fig

Fig_62
After writing both code save files
Run “.html” file direct open on browser

47

Fig_63
Click on Inspect

Fig_64
Click on “Console”
Javascript Program Output show

Next Example JavaScript
Save the code ins a file ?.js? extension e.g. ?my
javascript_2.js”
48

Fig_65
Next Write code on HTML
In html coding write “.js”file name show in Fig

Fig_66
After writing both code save files
Run “.html” file direct open on browser
49

Fig_67
5.3. API on BOLT

Enable API key on your Bolt ID

Fig_68
5.4. Circuit Connection for an LED
Small led have 2 pind one is ±ve and other is –
ve.
ve Pin connect to the 0pin and –ve connect to
the ground


50

Fig_69
5.5. Controlling LED Over Bolt Cloud
First open you Cloud ID www.clod.boltiot.com

Create a new project or Add a device
Setup hardware show in fig

Fig_70
Write a Html Code.
51

<!DOCTYPE html>
<html>
<head>
<title>Bolt IoT Platform</title>
<script type="text/javascript"
src="https://cloud.boltiot.com/static/js/boltCommands.js"></
script>
<script>
setKey('{{ApiKey}}','{{Name}}');
</script>
</head>
<body>
<center>
<button onclick="digitalWrite(0,
'HIGH');">ON</button>
<button onclick="digitalWrite(0,
'LOW');">OFF</button>
</center>
</body>
</html>

Fig_71

52

Save and Run a program

Fig_72
Press ON switch see on hardware Led ON show
in Fig.

Fig_73
5.6. Pulse Width Modulation
If the pin is on for 0.5ms and off for 0.5ms, the Bolt
will maintain a voltage of 3.3 volts on the pin for
0.5ms and 0 volts for 0.5ms. So the final voltage on
the pin will be close to 1.65v. Similarly, if the pin is
on for 0.9 ms and off for 0.1ms, then the final voltage
53

on the pin will be 3v. The Bolt WiFi module takes a
PWM value with which it calculates the period for
which the pin has to be kept on, and the period for
which the pin has to be kept off. The PWM value
should be in the range of 0 to 255. A value of 0, sets
the on time of the pin to 0ms, and a value of 255 sets
the on time of the pin to 1ms. So if you set the PWM
value to 0, the final voltage on the pin will be 0v, and
for a PWM value of 255, the final voltage on the pin
will be 3.3v. Similarly, for a PWM value of 128, the
voltage on the pin will be 1.65 volts.

5.7. Controlling LED Intensity Over Bolt
Cloud
First open you Cloud ID www.clod.boltiot.com

Create a new project or Add a device
Setup hardware show in fig

Fig_74
54

Write a Html Code.

<html>
<head>
<title>Bolt IoT Platform</title>
<script type="text/javascript"
src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
<script>
setKey('{{ApiKey}}','{{Name}}');
var deep=-1;
function updateBuzzer()
{
var jaan=document.getElementById('jaan').value;
if(deep!=jaan)
{
analogWrite(0,jaan);
document.getElementById('jaan_display').innerHTML=jaan;
}
deep=jaan;
}
setInterval(updateBuzzer,500);
</script>
</head>
<body>
55

pwm value:
<input type='range' id='jaan' min="0" max="255" value="0">
<div id='jaan_display'>0</div>
</body>
</html>


Fig_75
Save and Run a program

Fig_76
Increase Slider value see on hardware Led
Intensity show in Fig.
56

Show in Hardware Output


Fig_77
6. Cloud, APIs, And Alerts
6.1. Virtual Private Server(VPS)

Download VMware Link:-
https://my.vmware.com/web/vmware/free#desktop_en
d_user_computing/vmware_workstation_player/12_0
Ubuntu Server Image link:
http://releases.ubuntu.com/xenial/ubuntu-16.04.5-
server-i386.iso
Download and install carefully

57

6.2. Introduction to Linux
Every time you switch on your computer, you see a
screen where you can perform different activities like
write, browse the internet or watch a video. What is it
that makes the computer hardware work like that?
How does the processor on your computer know that
you are asking it to run a mp3 file?
Well, it is the operating system or the kernel which
does this work. A kernel is a program at the heart of
any operating system that takes care of fundamental
stuff, like letting hardware communicate with
software.
So, to work on your computer, you need an Operating
System(OS). In fact, you are using one as you read
this on your computer. Now, you may have used
popular OS's like Windows, Apple OS X but here we
will learn what Linux is and what benefits it offers
over other OS choices.

Fig_78
58

Linux Commands
Open VMware run a basic commands: how to make
any file (text, python any one)

Fig_79
59

Press “ctrl x” to save file

Fig_80
Learn more basic commands to Internet after
that’s move on next topics

6.3. Introduction to Python
Python is a popular programming language. It was
created by Guido van Rossum, and released in 1991.
It is used for:
web development (server-side),
software development,
mathematics,
System scripting.
Learn Basic commands:-

Fig_81
60

Fig_82
6.4. Bolt Python Library
Step 1: Update the packages on Ubuntu Execute the
command below so that the packages on Ubuntu are
updated to the latest version. If you skip this step, you
may encounter an error while installing the Boltiot
package.
“sudo apt-get -y update”
Step 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”
61

Step 3: Installing boltiot library using pip Now we
will install the boltiot python library on your Ubuntu
server. Type the below command in terminal to install
boltiot python library.
“sudo pip3 install boltiot”
Now we are done with boltiot python library
installation. In the next, we will learn how to use the
Bolt python library to check the device status and
switch off the device.

6.4.1.1. Controlling LED using Bolt Python
Library
Open a VMware software
Create a new python file
Write a program show in Fig

Fig_83
62

Connect LED to the 0pin
In this program have ON/OFF program with
have a light intensity Change in While loop
when you use ON/OFF Digital program, don’t
forget to comment analog program line, using
“#”.
Output

Fig_84

63

7. Interfacing Sensor over VPS
7.1. Hardware Connection for
Temperature Monitor

Step 1: Hold the sensor in a manner such that
you can read LM35 written on it.
Step 2: In this position, identify the pins of the
sensor as VCC, Output and Gnd from your left
to right. In the above image, VCC is connected
to the red wire, Output is connected to the
orange wire and Gnd is connected to the brown
wire.

Fig_85
Step 3: Using male to female wire connect the 3
pins of the LM35 to the Bolt Wifi Module as
follows:
VCC pin of the LM35 connects to 5v of the
Bolt Wifi module.
64

Output pin of the LM35 connects to A0
(Analog input pin) of the Bolt Wifi module.
Gnd pin of the LM35 connects to the Gnd.

Fig_86
7.2. Introduction to Twilio
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. Please note that SMS delivery via a trial
Twilio account is not guaranteed to be instant by
Twilio. Also, note that SMS will not be sent to
numbers which have DND(Do Not Disturb) turned
ON.
Creating an account on Twilio
65

Step 1: Open https://www.twilio.com/ in browser.
Step 2: Click on Get a Free API Key button to sign up.
Step 3: Fill all the necessary details in SIGN UP form.
Below is the
screenshot of filled sign up form.

Fig_87
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.
66

Fig_88
Step 5: Click on "Products" as shown on the screen
below

Fig_89
67

Step 6: Now enable the SMS services by clicking on
two checkboxes for Programmable SMS and Phone
Numbers as shown below

Fig_90
Once you have done this, scroll to the bottom of the
screen and click on "Continue"

Fig_91
68

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.

Fig_92
Step 8: Click on "Skip this step" when it asks you to
Invite a Teammate.

Fig_93

69

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

Fig_94
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

Fig_95
70

Step 11: From the drop-down menu, choose
"Programmable SMS". Now click on Get Started
button to generate phone number.

Fig_96
Step 12: Click on Get a number button.

Fig_97
Step 13: Then a popup will appear. Click on Choose
this number button.

71

Fig_98
Step 14: Then a popup will appear which will have
the final number. Copy this number and save to
notepad for future references.

Fig_99
That's it. You have successfully created the account on
Twilio.
7.3. Sending an SMS when Temperature Crosses
Threshold
Open VPS VMware
Create a new file name “cong.py”
Command “sudo nano conf.py”
Enter Programming show in Fig
72

Fig_100
Create a new file “sudo nano temp_sms.py”
Write a code show in Fig

Fig_101
Save a program
Connect a Bolt to supply
73

Run Command “python3 temp _sms.py”
Result

Fig_102

References
http://ijsrcseit.com/paper/CSEIT1831361.pdf


https://electronicsforu.com/electronics-
projects/top-esp8266-projects

74

https://www.researchgate.net/publication/32667
2970_Webserver_Based_Smart_Monitoring_Sy
stem_Using_ESP8266_Node_MCU_Module

https://ieeexplore.ieee.org/document/8663041



https://www.ijitee.org/wp-
content/uploads/papers/v8i6/F3569048619.pdfh
ttps://www.pantechsolutions.net/blog/iot-
projects-for-engineering-students/

https://www.academia.edu/40478064/IoT_Time_Evolving_Trends_in_the_Internet_of_Things_
iBooks_


https://www.academia.edu/40443636/Real-
Time_Internal_Inspection_of_Pontoons_of_Flo
ating_Roof_Tank_using_a_Mobile_Robot

Arutselvi.S, Sarah Maria Louis, Srinithi.S,
“Monitoring and Control of Relative Humidity in
Soil using NODMCU,” International Journal of
Engineering Trends and Technology (IJETT)
Volume 9 Number 10 - Mar 2014.

75

T. Bheema lingaiah, D.Hanumesh Kumar,
C.Nagaraja, Solomon Woldet- sadik,
“Development of Humidity and Temperature
Measurement Instrumentation System using
NODMCU”, International Journal of Advanced
Research in Electrical, Electronics and
Instrumentation Engineering, Vol. 2, Issue 10,
December 2013

Hosni Abu-Mulaweh, Indiana University-Purdue
University-Fort Wayne, “The Use of NODMCU
and Data acquisition unit to Monitor &amp;
Control Air- Conditioning Processes”, American
Society for Engineering Educa- tion, 2007.

S. V. Devika, Sk. Khamuruddeen, Sk.
Khamurunnisa, Jayanth Thota, Khalesha Shaik,
“Arduino Based Automatic Plant Watering
System”, International Journal of Advanced
Research in Computer Science and Software
Engineering 4(10), Volume 4, Issue 10,October
2014, pp. 449- 456.

Naveen Kumar R, Dr Prasad Krishna, “Low Cost
Data Acquisition and Control using Arduino
Prototyping Platform and NODMCU”,
76

International Journal of Science and Research
(IJSR), India Online ISSN: 23197064.

Diaa Mehdi Faris Mahmood Basil Mahmood,
“Data Acquisition of Greenhouse Using Arduino”,
Journal of Babylon University/Pure and Applied
Sciences/ No.(7)/ Vol.(22): 2014.

Sarah Maria Louis, S. Srinithi, “Monitoring of
Relative Humidity of Soil Using NODMCU”,
International Journal of Innovative Research
&amp; Development, Vol 3 Issue 3, March 2014.
77

KS OmniScriptum Publishing
Brivibas gatve 197
LV-1039 Riga, Latvia
Telefax: +371 686 204 55
[email protected]
www.omniscriptum.com
Buy your books fast and straightforward online - at one of world’s
fastest growing online book stores! Environmentally sound due to
Print-on-Demand technologies.
Buy your books online at
www.morebooks.shop
Kaufen Sie Ihre Bücher schnell und unkompliziert online – auf einer
der am schnellsten wachsenden Buchhandelsplattformen weltweit!
Dank Print-On-Demand umwelt- und ressourcenschonend produzi
ert.
Bücher schneller online kaufen
www.morebooks.shop
Tags