Sunteți pe pagina 1din 35

CHAPTER 1

Overview of project
1.1 Introduction

The Internet of Things (IoT) is becoming popular with research and industries.
The basic idea is that IoT will connect objects around us (electronic and electrical) to
provide seamless communication and contextual services provided by them. The
objective of this paper is to build Home automation using IoT using ESP8266 Wi-Fi
module and control it wirelessly using the smart phone. The forces that are driving it and
the benefits that are motivating it are increasingly numerous. The number of connected
devices on the IoT network will be huge. One estimate says that the number will be
nearly 40 billion, which is approximately 30 devices for each and every active social
network user in the world.

Smart phones have in-built Internet accessibility, so an external Wifi module


along with the microcontroller unit which is NodeMCU is used for wireless
communication. The Wifi module receives command from the mobile phone. So,
according to the input signal, with the help of Nodemcu, relay module can be used to vary
the voltage given to the loads. Loads are turned on and off with the help of relay module.

1.2. Aim of the system:

The main objective of this system is to automate the home appliances using
NodeMCU board which is being controlled by an android app through internet. This
reduces the manual work and reduces the power wastage.

1.3. Methodology

The problems that surfaced during the project were selecting the right kind of device
and interfacing these devices appropriately. The approach used was to minimize costs and
complexity and at the same time not sacrifice the objectives of the project.

Hardware Specifications:

 NodeMCU
 Relay Module

1
Software Specifications:

 Arduino IDE
 Language: Embedded C or Assembly Language
1.4. Significance of the project

To control the electronic devices through android mobile device via wifi module.

1.5. Organization of the project


In this report, Chapter 1 deals with a brief introduction and aim of the project.
Chapter 2 covers the information about Embedded systems and the block diagram of the
project. Chapter 3 covers the information about hardware components used in the project.
Chapter 4 covers the advantages and application about the project. Chapter 5 deals with
the results obtained. Chapter 6 deals with future scope. Chapter 7 deals with the
references used in the project.

2
CHAPTER 2
Hardware Description

2.1. Introduction with Block Diagram

Fig 2.1. Block diagram

2.2. NodeMCU – ESP8266

2.2.1. Introduction
NodeMCU is an open source development board and firmware based on the
widely used ESP8266 -12E WiFi module. It allows you to program the ESP8266 WiFi
module with the simple and powerful LUA programming language or Arduino IDE.

With just a few lines of code WiFi connection can be established and input/output
pins should be defined according to user needs exactly like arduino, turning ESP8266 into
a web server and a lot more. It is the WiFi equivalent of ethernet module. Now internet of
things (IoT) real tool is implemented.
With its USB-TTL , the NodeMCU Dev board supports directly flashing from
USB port. It combines features of WIFI accesspoint and station + microcontroller. These
features make the NodeMCU extremly powerful tool for Wifi networking. It can be used
as access point and/or station, host a webserver or connect to internet to fetch or upload
data.

3
2.2.2. Pin Diagram

Fig 2.2. pin diagram of NodeMCU

While writing GPIO code on NodeMCU, addressing cant be done with actual
GPIO Pin Numbers. There are different I/O Index numbers assigned to each GPIO Pin
which is used for GPIO Pin addressing. Refer following Fig 2.3 to check I/O Index of
NodeMCU GPIO Pins –

NodeMCU Dev Kit v1.0 pin descriptions

GPIO (General Purpose Input Output) Pins:

NodeMCU has general purpose input output pins on its board as shown in above
pinout diagram. It can be made digital high/low and control things like LED or switch on
it. Also, PWM signal on these GPIO pins can also be generated.

ADC (Analog to Digital Converter) channel (A0):

NodeMCU has one ADC channel/pin on its board.

4
Fig 2.3. pin specification of NodeMCU

SPI (Serial Peripheral Interface) Pins:

NodeMCU based ESP8266 has Hardware SPI (HSPI) with four pins available for
SPI communication. It also has SPI pins for Quad-SPI communication. With this SPI
interface, any SPI enabled device can be connected with NodeMCU and make
communication possible with it.

5
I2C (Inter-Integrated Circuit) Pins:

Node MCU has I2C functionality support on ESP8266 GPIO pins. Due to internal
functionality on ESP-12E and all its GPIOs cannot be used for I2C functionality. So, do
tests before using any GPIO for I2C applications.

UART (Universal Asynchronous Receiver Transmitter) Pins:

NodeMCU based ESP8266 has two UART interfaces, UART0 and UART1. Since
UART0 (RXD0 & TXD0) is used to upload firmware/codes to board, they can‟t be used
in applications while uploading firmware/codes.

2.2.3. Features

 Programable WiFi module.


 Arduino-like (software defined) hardware IO.
 Can be programmed with the simple and powerful Lua programming language or
Arduino IDE.
 USB-TTL included, plug & play.
 10 GPIOs D0-D10, PWM functionality, IIC and SPI communication, 1-Wire and
ADC A0 etc. all in one board.
 Wifi networking (can be used as access point and/or station, host a web server),
connect to internet to fetch or upload data.
 PCB antenna.
2.2.4. Technical specifications
Developer - Esp8266 Opensource Community
Type - Single board microcontroller
Operating System - XTOS
CPU - ESP8266
Memory - 128 kilobytes
Storage - 4 Megabytes
Power - USB (3.3V)
2.2.5. Conclusion
Here, the NodeMCU in this project is explained and all the features and technical
specifications are explained.
6
2.3.Blynk App
2.3.1.Introduction
Blynk is a Platform with IOS and Android apps to control Arduino, Raspberry Pi,
NodeMCU and the likes over the Internet. It's a digital dashboard where one can build a
graphic interface for the project by simply dragging and dropping widgets.
Blynk is not tied to some specific board or shield. Instead, it is supporting
hardware of our choice. Whether our Arduino or Raspberry Pi is linked to the Internet
over Wi-Fi, Ethernet or this new ESP8266 chip, Blynk will get us online and ready for the
Internet of our things.
2.3.2How Blynk Works
Blynk was designed for the Internet of Things. It can control hardware remotely, it
can display sensor data, it can store data, visualize it and do many other cool things.
There are three major components in the platform:
Blynk App – allows to create amazing interfaces for projects using various widgets that
are available.
Blynk Server - responsible for all the communications between the smartphone and
hardware.Blynk Cloud can be used or run the private blynk server locally. It is an open-
source, could easily handle thousands of devices and can even be launched on a
NodeMCU.
Blynk Libraries - for all the popular hardware platforms - enable communication with the
server and process all the incoming and outcoming commands.
Now imagine every time when the Button in the Blynk appis pressed, the message travels
to the Blynk Cloud, where it magically finds its way to hardware. It works the same in the
opposite direction and everything happens in a blynk of an eye.
2.3.3. Features
Similar API & UI for all supported hardware & devices
Connection to the cloud using:
Ethernet
WiFi
Bluetooth and BLE
USB (Serial)

7
Set of easy-to-use Widgets
Direct pin manipulation with no code writing
Easy to integrate and add new functionality using virtual pins
History data monitoring via History Graph widget
Device-to-Device communication using Bridge Widget
Sending emails, tweets, push notifications, etc.

Fig 2.4. Pictorial representation of connectivity of blynk app

2.3.4. What do I need to Blynk?

2.3.4.1. Hardware
An Arduino, Raspberry Pi, NodeMCU or a similar development kit.Blynk works over the
Internet. This means that the hardware chosen should be able to connect to the internet.
Some of the boards, like Arduino Uno will need an Ethernet or Wi-Fi Shield to
communicate, others are already Internet-enabled: like the ESP8266, Raspberri Pi with
WiFi dongle, Particle Photon or SparkFun Blynk Board.
2.3.4.2. A Smartphone
The Blynk App is a well designed interface builder. It works on both iOS and
Android. Blynk app should be installed in smart phone.

8
2.3.5. Procedure to interface android app with NodeMCU
Create a Blynk Account
After downloading the Blynk App, new Blynk account need to be created. This
account is separate from the accounts used for the Blynk Forums.It is recommended to
use a real email address because it will simplify things later.

Fig 2.5. Picture of creating blynk account


Create a New Project
After successfully logged into account, start by creating a new project.

Fig 2.6. Picture of creating project in blynk

9
Give it a name.

Fig 2.7. Picture of assigning project name in blynk


Choose the Hardware
Select the hardware model which is used.

Fig 2.8. Picture of choosing hardware in blynk

10
Auth Token
It is a unique identifier which is needed to connect our hardware to our
smartphone. Every new project created will have its own Auth Token. Auth Token
automatically appears on email after project creation. It can also be copied manually.
Click on devices section :

Fig 2.9. Picture of accessing Auth token in blynk


And token will be appeared

Fig 2.10. Picture of Auth token of a project in blynk


11
Create a button
It‟s very convenient to send it over e-mail. Press the e-mail button and the token
will be sent to the e-mail address used for registration. Token line can also be copied to
the clipboard. Now press the “Create” button.

Fig 2.11. Picture of creating a button in project


Add a Widget
Let‟s add a button to control the electronic devices.Tap anywhere on the canvas to open
the widget box. All the available widgets are located here. Now pick a button.

Fig 2.12. Picture of widget setting of a button in blynk


12
Drag-n-Drop - Tap and hold the Widget to drag it to the new position.
Widget Settings - Each Widget has it‟s own settings. Tap on the widget to get to them.

Fig 2.13. Picture of button settings of a project


The most important parameter to set is PIN.The list of pins reflects physical pins
defined by our hardware. If LED is connected to Digital Pin 8 - then select D8.

Fig 2.14. Picture of creating pin


13
Run The Project
When done with the Settings - press the PLAY button. This will switch from
EDIT mode to PLAY mode where one can interact with the hardware. While in PLAY
mode, it will not be able to drag or set up new widgets, press STOP and get back to EDIT
mode. A message saying “Arduino UNO is offline” is popped.

Fig 2.15. Picture of running the project


Getting Started With Hardware-How To Use an Example Sketch
By now Blynk Library should be installed in mobile. If not, install from blynk
application portal.
Example sketches will help to get hardware online quickly and major Blynk
features.
Open the example sketch according to the hardware model or shield that is used.
Auth Token
In this example sketch, this line can be found:
Char auth[]=”Our Auth Token”;
This is the Auth Token that is emailed. Check the email and copy it, then paste it inside
the quotation marks.
It should look similar to this:
char auth[]=”f45626c103a94983b469637978b0c78a”;

14
Upload the sketch to the board and open Serial Terminal. Wait until something like this is
found:
Blynk v.X.X.X
Your IP is 192.168.0.11
Connecting…
Blynk connected!
Go back to the Blynk App, push the button and turn the LED on and off! It should be
Blynking.

Fig 2.16. Picture of button of a project


2.3.6. Conclusion:
Here, how a mobile application(blynk) is installed and interfaced with wifi
module is seen. Further, many examples can be used to improvise the project features.
2.4. Relay module
2.4.1. Introduction
The relay module is an electrically operated switch that allows you to turn on or
off a circuit using voltage and/or current much higher than a microcontroller could
handle. There is no connection between the low voltage circuit operated by the
15
microcontroller and the high power circuit. The relay protects each circuit from each
other.
The each channel in the module has three connections named NC, COM, and NO.
Depending on the input signal trigger mode, the jumper cap can be placed at high
level effective mode which „closes‟ the normally open (NO) switch at high level input and
at low level effective mode which operates the same but at low level input.

Fig 2.17. Relay Module connected to NodeMCU


2.4.2. Pin Diagram

Fig 2.18. Image of Relay Module

16
2.4.3. Specifications
VCC: 5V DC
COM: 5V DC
IN1: high/low output
IN2: high/low output
GND: ground
2.4.4. Basic design
A simple electromagnetic relay consists of a coil of wire wrapped around a soft
iron core (a solenoid), an iron yoke which provides a low reluctance path for magnetic
flux, a movable iron armature, and one or more sets of contacts (there are two contacts in
the relay pictured). The armature is hinged to the yoke and mechanically linked to one or
more sets of moving contacts. The armature is held in place by a spring so that when the
relay is de-energized there is an air gap in the magnetic circuit. In this condition, one of
the two sets of contacts in the relay pictured is closed, and the other set is open. Other
relays may have more or fewer sets of contacts depending on their function. The relay in
the picture also has a wire connecting the armature to the yoke. This ensures continuity of
the circuit between the moving contacts on the armature, and the circuit track on
the Printed Circuit Board (PCB) via the yoke, which is soldered to the PCB.

When an electric current is passed through the coil it generates a magnetic


field that activates the armature, and the consequent movement of the movable contact(s)
either makes or breaks (depending upon construction) a connection with a fixed contact.
If the set of contacts was closed when the relay was de-energized, then the movement
opens the contacts and breaks the connection, and vice versa if the contacts were open.
When the current to the coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed position. Usually this
force is provided by a spring, but gravity is also used commonly in industrial motor
starters. Most relays are manufactured to operate quickly. In a low-voltage application
this reduces noise; in a high voltage or current application it reduces arcing.

2.4.5.Working
Relay acts as an electromagnetic switch which acts as a medium between Node
MCU board and AC devices. As per the programming, the loads are turned on and off

17
with the help of relays. Relays controls the voltage supply given to loads. When relay
switch is closed, load turns ON.When relay switch is opened, load turns OFF.

2.4.6. Applications

 Relays are used wherever it is necessary to control a high power or high voltage
circuit with a low power circuit, especially when galvanic isolation is desirable.
The first application of relays was in long telegraph lines, where the weak signal
received at an intermediate station could control a contact, regenerating the signal
for further transmission. High-voltage or high-current devices can be controlled
with small, low voltage wiring and pilots switches. Operators can be isolated from
the high voltage circuit. Low power devices such as microprocessors can drive
relays to control electrical loads beyond their direct drive capability. In an
automobile, a starter relay allows the high current of the cranking motor to be
controlled with small wiring and contacts in the ignition key.

 Electromechanical switching systems including Strowger and Crossbar telephone


exchanges made extensive use of relays in ancillary control circuits.

 As relays are much more resistant than semiconductors to nuclear radiation, they
are widely used in safety-critical logic, such as the control panels of radioactive
waste-handling machinery. Electromechanical protective relays are used to detect
overload and other faults on electrical lines by opening and closing circuit
breakers.
2.4.7. Conclusion
 Isolate controlling circuit from controlled circuit
 Control high voltage system with low voltage
 Control high current system eith low current
 Safety is increased
 Protective relays are essential for keeping the faults in the system isolated and
keep equipment from not being damaged
 Electromgnetic relays are best suitable for high frequency switching applications
and do have a limited life due to wear on the contacts inside the relay.

18
CHAPTER 3
Software Description

3.1 Arduino Software (IDE) - Introduction:


The open-source Arduino Software (IDE) makes it easy to write code and
upload it to the board. It runs on Windows, Mac OS X, and Linux. The environment
is written in Java and based on Processing and other open-source software. This
software can be used with any Arduino board.
 Arduino was born at the Ivrea Interaction Design Institute as an easy tool for
fast prototyping, aimed at students with or without a background in
electronics and programming.
 Arduino is an open-source prototyping platform based on easy-to-use
hardware and software.
 Arduino boards are able to read inputs - light on a sensor, a finger on a
button, or a message - and turn it into an output - activating a motor, turning
on an LED, publishing something online and many more.
 You can tell your board what to do by sending a set of instructions to the
microcontroller on the board.
 To do so you use the Arduino programming language (based on Wiring), and
the Arduino Software (IDE), based on Processing.

3.2 Features of Arduino IDE:


 Inexpensive - Arduino boards are relatively inexpensive compared to other
microcontroller platforms.
 Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh
OSX, and Linux operating systems. Most microcontroller systems are limited to
Windows.
 Simple, clear programming environment - The Arduino Software (IDE) is
easy-to-use for beginners, yet flexible enough for advanced users to take
advantage of as well.
 Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers can
make their own version of the module, extending it and improving it.

19
 Open source and extensible software - The Arduino software is published as
open source tool and the language can be expanded through C++ libraries.

3.3 Programming ESP8266 ESP-12E NodeMCU using Arduino IDE

Node MCU Dev Board is based on widely explored esp8266 System on Chip
from Expressif. It combined features of WIFI accesspoint and station + microcontroller
and uses simple LUA based programming language. ESP8266 Node MCU offers-

 Arduino like hardware IO

 Event-driven API for network applicaitons

 10 GPIOs D0-D10, PWM functionality, IIC and SPI communicaiton, 1-Wire and
ADC A0 etc. all in one board

 Wifi networking (can be uses as access point and/or station, host a webserver),
connect to internet to fetch or upload data.

Recently, there has been interest in programming ESP8266 systems using Arduino IDE.
Programming, of ESP8266 using Arduino IDE is not very straight forward, until it is
properly configured. Especially because, the Input and output pins have different
mapping on NodeMCU than those on actual ESP8266 chip.

NOTE- To use NodeMCU V1 or V2 or V3 dev boards using Arduino IDE, no need to


flash it with firmware using nodemcu flasher. It is required only if Node MCU is
programmed using Lua script with esplorer etc.

First and foremost word of - CAUTION !

* The ESP8266 chip requires 3.3V power supply voltage. It should not be powered with 5
volts like other arduino boards.

* NodeMCU ESP-12E dev board can be connected to 5Vusing micro USBconnector


or Vin pin available on board.

* The I/O pins of ESP8266 communicate or input/output max 3.3V only. i.e. the pins
are NOT 5V tolerant inputs.

The pin mapping of NodeMCU dev board are different from those of ESP8266 GPIOs.

20
Step 1: NodeMCU ESP-12E Pin Mapping

Fig 3.1. Pin mapping of NodeMCU

Step 2: Getting to Know

Fig 3.2. Connection of Blynk with NodeMCU


Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi
and the likes over the Internet. Blynk was dessigned for the Internet of Things. It can
control hardware remotely, it can display sensor data, it can store data, vizualize it and do
many other cool things. It's a digital dashboard where you can build a graphic interface
21
for your project by simply dragging and dropping widgets. It's really simple to set
everything up and you'll start tinkering in less than 5 mins. Blynk is not tied to some
specific board or shield. Instead, it's supporting hardware of your choice. Whether your
Arduino or Raspberry Pi is linked to the Internet over Wi-Fi, Ethernet or this new
ESP8266 chip, Blynk will get you online and ready for the Internet Of Your Things.

How does it work?

There are three major components in the platform:


Blynk App - allows to you create amazing interfaces for your projects using various
widgets that are provided.

Blynk Server - responsible for all the communications between the smartphone and
hardware. You can use our Blynk Cloud or run your private Blynk server locally. It‟s
open-source, could easily handle thousands of devices and can even be launched on a
Raspberry Pi.

Blynk Libraries - for all the popular hardware platforms - enable communication with
the server and process all the incoming and outcoming commands.

Step 3: Materials Required


Now that some insights about the hardware and the app are seen, therefore the
following components are required:

1. Node MCU Esp8266 12E development board

2. Smart Phone with Blynk App installed

3. AC bulb or any load

4. Breadboard

5. Arduino IDE v1.6.6

22
Step 4: Setting Up Blynk With Arduino IDE

Fig 3.3. Installation of blynk libraries


This blynk app has set of library files which have to be included in the Arduino IDE
environment before the project is executed

1. Follow the link to install libraries-http://www.blynk.cc/getting-started/

2. Once the Zip file is downloaded ,extract it and individually copy all the folder to your
libraries folder of your arduino.
23
Fig 3.4. Selection of NodeMCU module in Aurdino IDE
3. Once done just open Arduino IDE and go to Sketch-> Include libraries and blynk in
the menu is observed.

4. If it is found then libraries have been included successfully.

*Now it is time to include the board configuration in the Arduino IDE

What is board configuration?

For example go to Tools->Board Menu list of boards is found. All this boards
listed have different configuration settings. Therefore NodeMCU's board configurations
should also be included which typically contain the board architecture , clock speed, baud
rate etc.

In the Arduino IDE go to File->Preferences

Now Copy the below link and paste it in the Additional Boards Manager Url text box

http://arduino.esp8266.com/stable/package_esp8266c...

Restart the Arduino IDE after that.

24
Now after restarting the Arduino IDE , go to Tools->Boards and select Node MCU board
, mine was version 0.9

Step 5: Setting Up Blynk


Step 6: Uploading the Code

Fig 3.5. Including blynk libraries in Arduino IDE


1.Connect Esp8266 Wifi to PC
2. Open Arduino IDE

3. Then go to File->Eamples->Blynk-Boards_Wifi->Esp8266Standalone

4. Select the correct board (NodeMCU 1.0) and the com port from the Tools Menu

5. A snippet from the code

Serial.begin(9600); // Change Baud Rate to 115200

Blynk.begin(auth, "ssid", "pass"); // Enter Wifi SSID and password, both inside the
double quotation

Finally Save the file and Press Upload

Step 7: Final Execution


1. After uploading the code
2. Open the Blynk app in the Phone
3. Let it connect to the internet

25
4. Then you would see your dashboard with a button
5. Press Play button on the top most right corner of the app
6. Press the Button and you would see the LED Turn ON!!
Conclusion

Here, software we used in this project is discussed. After the successful


implementation of above steps, output can be observed.

26
CHAPTER 4

Project Description

4.1. Introduction

The process of controlling or operating various equipment, machinery, industrial


processes, and other applications using various control systems and also with less or no
human intervention is termed as automation. There are various types of automation based
on the application they can be categorized as home automation, industrial automation,
autonomous automation, building automation, etc.,. In this article, let us discuss about
wireless home automation using IOT (Internet of Things).Home automation is the process
of controlling home appliances automatically using various control system techniques.
The electrical and electronic appliances in the home such as fan, lights, outdoor
lights, fire alarm, kitchen timer, etc., can be controlled using various control techniques.
Block Diagram:

Fig 4.1. Block diagram of automation of a bulb


4.2 Working

The load can be controlled and monitored using a mobile application with user
configurable front end. The user can send commands through the allotted IP and these

27
commands are fed to Wi-Fi module. The Wi-Fi module is configured to access internet
using any nearby wireless modem. The commands received by a Wi-Fi module are
executed by a program within a Wi-Fi module. The Wi-Fi module is interfaced to voltage
relays through the loads are turned ON & OFF based on commands. The load status (ON
or OFF) will be displayed in the dashboard of app. The platform which is used for
programming the NodeMCU board is Arduino IDE software. NodeMCU board has to be
installed in boards manager in arduino app.

4.3 Conclusion

This project helps in controlling the electronic appliances through internet using
NodeMCU board with an android app. This results in efficient usage of devices.

28
CHAPTER 5

Advantages and Applications

5.1. Advantages

Adds Safety through appliance and lighting Control

Android application is user-friendly.

Secures Home Through Automated Door Locks.

Increases Awareness through Security cameras .

Increases Convenience through temperature adjustment .

Contributes to Economy.

Technically expertsare not required

Allows You Control When Out of Town .

Programming is simpler.

DISADVANTAGES

o Usage of android app in smart phones consumes battery.


o Equipment and installation costs
o System crashes due to any damage in the interconnection

5.2. APPLICATIONS

o Many industrial applications require automation in terms of improving the


security and economy.
o Automation plays key role in security system.
29
o Outdoor lawn irrigation systems
o HVAC : The first and the foremost applications used in any industry are heating
ventilating and air conditioning

5.3. Conclusion

Thus home automation helps to keep the appliances safe, as well as helps to know
what they are up to each day, which can be quite helpful for a busy parent. In sum,
investing in a home automation system will benefit in several ways. It is cost effective. It
will save time and energy. And perhaps the most important it will keep the home secure.

30
CHAPTER 6

Results

Description

The explosive growth in cellular mobile communications in the recent decade is


changing the way people live and work. Mobile handsets today are essentially handheld
computers. The handheld sets allow users to download and run applications. Program is
dumped into the Node MCU through USB cable. This board is interfaced with Blynk app
in mobile. Commands are sent by the user from the mobile application to Node MCU.
This results in operations on loads as per user requirement.

Fig.6.1. Output of the project.

Conclusion

Hence the home automation using IoT is achieved with the help of mobile application and
Node MCU board. In this way wireless communication is also achieved.

31
Future Scope

In future, apart from controlling the electronic appliances from distant places
secured environment can also be acheived .For long range wireless communication WIFI-
module can be used.

Using this paper as a framework, it will give immediate access to information


about the physical world and the objects, leading to innovative services and solutions and
leading to an increase in efficiency and productivity. In the near future the Internet and
wireless technologies will connect different sources of information such as sensors,
mobile phones and cars in an ever tighter manner. The number of devices which connect
to the Internet is – seemingly exponentially – increasing. These billions of components
produce consume and process information in different environments such as logistic
applications, factories and airports as well as in the work and everyday lives of people.

32
References

[1] Andrea Zanella, Nicola Bui, Angelo Castellani, Lorenzo Vangelista, Michele Zorzi,
“Internet of Things for Smart Cities,” in IEEE Internet Of Things Journal, February,2014.

[2] 9Sean Dieter, Tebje Kelly, Nagender Kumar Suryadevara, and Subhas Chandra
Mukhopadhyay, “Towards the Implementation of IoT for Environmental Condition
Monitoring in Home” in IEEE Sensors Journal, 2013.

[3] Nikhil Singh, Shambhu Shankar Bharti, Rupal Singh, Dushyant Kumar Singh,
"Remotely controlled home automation system", Advances in Engineering and
Technology Research (ICAETR), International Conference on. IEEE, 2014

[4] Gopinath Marrapan. (2015).An inexpensive IoT enabler using ESP8266.


[Online].Available: http://www.instructables.com/id/An-inexpensive-IoTenabler-using-
ESP8266

33
Appendix

Software Description

The Arduino project provides the Arduino integrated development environment (IDE),
which is a cross-platform application written in the programming language Java. It
originated from the IDE for the languages Processing and Wiring. It includes a code
editor with features such as text cutting and pasting, searching and replacing text,
automatic indenting, brace matching, and syntax highlighting, and provides simple one-
click mechanisms to compile and upload programs to an NodeMCU board. It also
contains a message area, a text console, a toolbar with buttons for common functions and
a hierarchy of operation menus.

A program written with the IDE for NodeMCU is called a sketch. Sketches are saved on
the development computer as text files with the file extension. Arduino Software (IDE)
pre-1.0 saved sketches with the extension.

The Arduino IDE supports the languages C and C++ using special rules of code
structuring. The Arduino IDE supplies a software library from the Wiring project, which
provides many common input and output procedures. User-written code only requires two
basic functions, for starting the sketch and the main program loop, that are compiled and
linked with a program stub main() into an executable cyclic executive program with
the GNU toolchain, also included with the IDE distribution. The Arduino IDE employs
the program avrdude to convert the executable code into a text file in hexadecimal
encoding that is loaded into the Arduino board by a loader program in the board's
firmware.

Due to the company's open source nature, there exist many free public libraries for
developers to use to augment their projects.

34
Code used to control the bulb

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

char auth[] = "064f424dc99945a98f6e52cebdd80094";

char ssid[] = "idea";

char pass[] = "hari123456";

void setup()

Serial.begin(9600);

Blynk.begin(auth, ssid, pass);

void loop()

Blynk.run();

Conclusion

Hence by using this application and code it has been possible to control the
electronic appliances.

35

S-ar putea să vă placă și