0% found this document useful (0 votes)
24 views45 pages

Internship Report Igita

Uploaded by

Sivakumar Siva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views45 pages

Internship Report Igita

Uploaded by

Sivakumar Siva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Wellfare Institute of Science Technology and Management

Department of Electronics & Communication Engineering

INTERNSHIP REPORT
Skill oriented course

Manual Prepared by

PYDI SIVA KUMAR


(B.Tech)

1
WELLFARE INSTITUTE OF SCIENCE TECHNOLOGY AND
MANAGEMENT
(Approved by AICTE, Affiliated to Andhra University)
Pinagadi (V), Pendurthi (M), Visakhapatnam 531173

This is to certify that this is a bonafide record of _____________________________

laboratory performed by Mr/Ms __________________________________________

of _____________________ B.Tech. _______________, Regd. No. _____________

year ______________. Number of experiments performed ____________________

Faculty In-charge Head of the Department

External Examiner

2
ACKNOWLEDGEMENT

We are pleased to acknowledge our sincere thanks to the Board of Management


of IGITA for their kind encouragement in doing this project and for completing
it successfully. We are grateful to them.

We convey our thanks to the Head of the Department of


Electronic Communication and Engineering and the Principal of Wellafre Institute of
Science Technology and Management, Coordinator Kalam Ma'am, and Manikanta Sir for
their guidance.

We would like to express our sincere and deep sense of gratitude to our
year coordinator Dr. M. KAVITHA for her valuable guidance and constant encouragement,
which paved the way for the successful completion of our work.

3
Certificate page

4
CONTENTS

NO DESCRIPTION PAGE NO

1. INTRODUCTION 7

2.
HISTORY 8

2.1 EVOLUTION OF IOT 8

2.2 THE HISTORY OF IOT 9

3. LAYER OF IOT 10

4. ARCHITECTURE OF IOT 11

5.
APPLICATION OF IOT 11

5.1 AGRICULTURE 12

5
5.2 SMART HOME 13

5.3 SMART CITIES 13

5.4 HEALTH CARE 14

5.5 CONNECTED CARS 15

5.6 MACHINE 2 MACHINE 15

6.
COMPONENT OF IOT 16

6.1 SENSORS 16

6.2 CONNECTIVITY 16

6.3 DATA PROCESSING 17

6
6.4 USER INTERFACE 17

7.
7.1 CLOUD OF IOT 18

7.2 CLOUD USED FOR IOT 18

8.

TYPE OF CLOUD 19

8.1 PUBLIC CLOUD 19

8.2 PRIVATE CLOUD 19

8.3 COMMUNITIY CLOUD 19

8.4 HYBRID CLOUD 19

7
9.
FEATURSES OF IOT 19

9.1 CONNECTIVITY 19

9.2 ANALYZING 19

9.3 INTEGRATING 19

9.4 ARTIFICIAL INTELLIGENCE 19

9.5 SENSING 20

9.6 ACTIVE ENGAGEMENT 20

9.7 ENDPOINT MANAGEMENT 20

10. MICROPROCESSOR & MICROCONTROLLER 21

8
11.
ARDUINO 22

11.1 WHAT IS ARDUINO 22

11.2 TYPE OF ARDUINO BOARD 23

11.3 THE ARDUINO DEVELOPMENTBOARD 24

11.4 PARAMETER 25

11.5 PIN DIAGRAM OF ARDUINO 26

11.6 SOFTWARE DOWNLOAD 26

11.7 TOOLS BAR DETAILS 27

9
12.
PROGRAM 27

12.1 LED BLINKING 28

12.2 BUTTON LED 29

12.3 IR SENSORS 30

12.4 ULTROSONIC SENSORS 31

12.5 DHI 11 32

13.1 HELLO WORLD 35

37

13.2 PUSH BUTTON

10
13.3 FORCE SENSOR WITH 6 LEDS 37

13.4 Soil Moisture Sensor

13.5 Servo motor with potentiometer

13.6 TMP36 Temperature Sensor With Arduino

13.7 Control of 4 DC Motors with L293D

13.8 PIR SENSOR WITH LED

14.
14.1 ADVANTAGE 38

14.2 DISADVANTAGE 39

15. CONCLUTION 39

11
1.INTRODUCTION:

*The internet of things is the extension of internet connectivity into physical devices and everyday objects.
*IOT is simply the network of interconnected things/devices which are embedded with sensors, software
,network, connectivity and necessary electronics that enables them to collect and exchange data making them
responsive.
*It makes devices and systems taking all the things in the world and connecting them to the internet.
*The internet of things (IOT) refers to the ever-growing network of physical object that feature an IP address for
internet connectivity, and the communication that occurs between these objects and others internet- enabled
devices and systems.
*It is also referred to as Machine-to-Machine (M2M), Skynet or internet of everything.
*These devices collect useful data with the help of various existing technologies and then autonomously flow
the data between other devices.

FIG 1.INTERNET OF THINGS

12
2.HISTORY:

FIG 2. EVOLUTION OF IOT

13
FIG 2.1 THE HISTORY OF IOT

14
3.LAYER OF INTERNET OF THINGS:

FIG 3. REFERENCE MODEL OF IOT

4.ARCHITECTURE OF IOT:
*The working of IOT is different for different IOT echo system (architecture). However, the key concept of there working
are similar.
*The entire working process of IOT starts with the device themselves, such as smartphones , digital watches, electronic
appliances, which securely communicate with the IOT platform.
*The platforms collect and analyze the data from all multiple devices and platforms and transfer the most valuable data
with applications to devices.

15
FIG 4. ARCHITECTURE OF IOT

5.APPLICATION OF IOT:
5.1 Agriculture
5.2 Smart home
5.3 Smart cities
5.4 Health care
5.5 Connected cars 5.6
Machine 2 machine

5.1 AGRICULTURE:
*Field management – strategically placed IOT sensors will enable collection of crucial data such as field history, soil
moisture , and vegetation map.
*Climate analysis& forecast – installing IOT – powered weather stations will allow monitoring climate conditions and help
forecast weather.
*Equipment tracking - IOT sensors installed will enable location tracking and predictive maintenance of machine by
identifying defects.
*Energy & water conservation- IOT sensors can help monitor water consumption and energy consumption. Also identify
faulty pipes &leaking equipment to save water.

16
FIG5.1 AGRICULTURE OF IOT

5.2 SMART HOME:


*Device abstraction layer – the local interface that applications on the gateway use.
*Device driver interface – the interface to integrate HAN technologies.
*Remote interface – the interface between an operator cloud platform and the gateway.
*Cloud API – the interface provided to third parties from the operator cloud platform.

17
FIG5.2 SMART HOME

5.3 SMART CITIES:


*Resource management- collecting energy usage and water quality data to analyze and optimize consumption.
* Waste management – introducing smart recycling systems, improving sanitation.
*Eco friendly infrastructure- analyzing and reducing waste , mindful consumption natural resources,vehicle sharing
system.
* Smart lighting- dimming street lights when no one around to save energy.

FIG 5.3 SMART CITY


5.4 HEALTH CARE:
*Telemedicine - remote appointment, remote diagnostics, remote monitoring, medication adherence.
*Hospital environmental condition monitoring- air quality, temperature , hazard sensing, lighting control.
*Connected ambulance - remote diagnostics, remote communication and data transfer.
*Immersive media – media training simulation with VR, AR decision support testing.
18
FIG5.4 HEALTH CARE OF IOT

5.5 CONNECTED CARS:


*Thecars use several sensors and embedded system connected to the cloudand the internet to keep generating data and
sending them to the cloud for informed deision –making through meachine learning.

*Through it will take a few more years for the technology to evolve completely and for countries to amend laws
and policies, what we’re witnessing right now is one of the best application of IOT.

Z FIG 5.5 CONNECTED CARS

19
5.6 MACHINE 2 MACHINE:

FIG 5.6 MACHINE 2 MACHINE

6. COMPONENT OF IOT:
*Devices& sensors
*Connectivity
*Data processing
*User interface

6.1 Sensors:
*A sensor is device that measures physical impact from its environment and converts it into that can be interpreted by a
computer.
For example: speed, lights, sound and pressure.

6.2 Connectivity:
*Several communications protocols and technologies are used in IoT to connect to internet cloud. Depending upon range
,cost, power usage and the data rate etc. The right one used.
For example: Bluetooth, mobile phones and wi-fi

6.3 Data processing:


*In the processing stage, a computer transforms the raw data into information. The transformation carried out by using
different data manipulation techniques.
For example: collecting feed of all electrical applications and extracting car number from video feed of speeding cars.

6.4 User interface:

20
*The information processed is made available to the end- user in some way, like giving alerts, notifications, monitoring ,
continuous feed or controlling the system remotely.

7.CLOUD IN IOT:

*Cloud is basically used for memory storage . Generally cloud computing is a virtualization technology.
*. Cloud computing is the combination of hardware and software resources to access the data through the cloud.
*It acts as a data storage element and configures the devices i.e., it stores bulk amount of data or information through
online networking.
*Cloud doesn’t require separate software and we access data through web browser. For example, Google photos, Google
drives, etc.

FIG 7.1 CLOUD IN IOT

21
7.1 CLOUD USED FOR IOT:

FIG7.1 CLOUD USED FOR IOT

8.TYPE OF CLOUD:
*public cloud
*Private cloud
*Community cloud
*Hybrid cloud

8.1 Public cloud:


* A public cloud is a type of computing in which a service provider makes resources available to the public via the internet.
*For example, google cloud , Microsoft azure, etc. But it provides less security as general public can access the cloud

8.2 Private cloud:


*Private cloud is also known as an internal cloud or corporate cloud. Private cloud provides computing services to a
private internal network (within the organization) and selected users instead of the general public.
*For example, Oracle, Cisco, etc. It provides good security.

8.3 Community cloud:


*Community cloud is a cloud infrastructure that allows systems and services to be accessible by a group of several
organizations to share the information.
*Example: Our government organization within India may share computing infrastructure in the cloud to manage data.

8.4 Hybrid cloud:


*Hybrid cloud refers to a mixed computing, storage, and services environment made up of on-premises infrastructure,
private cloud services, and a public cloud.
*Here critical information is stored in private such as username & passwords while others stored in public cloud.

22
9. FEATURES OF IOT:
The most important features of IOT on which it works are connectivity, analyzing, integrating, active engagement, and
many more. Some of them are listed below:
9.1 Connectivity: Connectivity refers to establish a proper connection between all the things of IOT to IOT
platform it may be server or cloud. After connecting the IOT devices, it needs a high speed messaging between
the devices and cloud to enable reliable, secure and bi-directional communication.
9.2 Analyzing: After connecting all the relevant things, it comes to real-time analyzing the data collected and use
them to build effective business intelligence. If we have a good insight into data gathered from all these things,
then we call our system has a smart system.
9.3 Integrating: IOT integrating the various models to improve the user experience as well.
9.4 Artificial Intelligence: IOT makes things smart and enhances life through the use of data. For example, if we
have a coffee machine whose beans have going to end, then the coffee machine itself order the coffee beans
of your choice from the retailer.
9.5 Sensing: The sensor devices used in IOT technologies detect and measure any change in the environment and
report on their status. IOT technology brings passive networks to active networks. Without sensors, there
could not hold an effective or true IOT environment.
9.6Active Engagement: ActiveIOT makes the connected technology, product, or services to active
engagement between each other.
9.7Endpoint Management: It is important to be the endpoint management of all the IOT system otherwise, it makes the
complete failure of the system. For example, if a coffee machine itself order the coffee beans when it goes to end but what
happens when it orders the beans from a retailer and we are not present at home for a few days, it leads to the failure of
the IOT system. So, there must be a need for endpoint management.

10.MICROPROCESSOR:
*A microprocessor is a computer processor where the data processing logic and control is included on a single
integrated circuit, or a small number of integrated circuits.
*The microprocessor contains the arithmetic, logic, and control circuitry required to perform the functions of a computer's
central processing unit.
* The integrated circuit is capable of interpreting and executing program instructions and performing
arithmetic operations.
*The microprocessor is a multipurpose, clock-driven, register-based, digital integrated circuit that accepts binary data as
input, processes it according to instructions stored in its memory, and provides results (also in binary form) as output.
*Microprocessors contain both combinational logic and sequential digital logic, and operate on numbers and symbols
represented in the binary number system.
*The integration of a whole CPU onto a single or a few integrated circuits using Very-Large-Scale Integration (VLSI) greatly
reduced the cost of processing power.
* Integrated circuit processors are produced in large numbers by highly automated metal-
oxidesemiconductor (MOS) fabrication processes, resulting in a relatively low unit price.
23
FIG 10.1 MICROPROCESSOR

MICROCONTROLLER:

*A microcontroller (μC or uC) is a solitary chip microcomputer fabricated from VLSI fabrication. A micro controller
is also known as embedded controller.
*Today various types of microcontrollers are available in market with different word lengths such as 4bit, 8bit, 64bit
and 128bit microcontrollers.
*Microcontroller is a compressed micro computer manufactured to control the functions of embedded systems in office
machines, robots, home appliances, motor vehicles, and a number of other gadgets.
*A microcontroller is comprises components like - memory, peripherals and most importantly a processor.
Microcontrollers are basically employed in devices that need a degree of control to be ap plied by the user of th

FIG 10.2 MICROCONTROLLER

24
11. ARDUINO

11.1 WHAT IS ARDUINO?

FIG 11.1 ARDUINO


11.2TYPE OF ARDUINO BOARD:

FIG 11.2.1 ARDUINO UNO 11.2.2 ARDUINO DUE

25
FIG 11.2.4 ARUDINO LEONARDO
FIG 11.2.3 ARUDINO MEGA

11.3 THE ARDUINO DEVELOPMENT BOARD

26
11.4 PARAMETER

Parameter Value
CBU type 8-bit AVR
Maximum CBU speed 20 MHz
performance 20MIPS at20 MHz
Flash memory 32 KB
SRAM 2 KB
EEPROM 1 KB
Package pin count 28 OR 32
Capacitive touch sensing channels 16
Maximum I/O pins 23
External interrupts 2
USB interface NO

11.4 PIN DIAGRAM OF ARDUINO

FIG 11.4 PIN DIAGRAM

Vin: This is the input voltage pin of the arduino board used to provide input supply from an external power source.
5V: This pin of the arduino board is used as a regulated power supply voltage and it is used to give supply to the board as
well as onboard components.
3.3V: This pin of the board is used to provide a supply of 3.3V which is generated from a voltage regulator on the board

27
GND: This pin of the board is used to ground the arduino board.
Reset: This pin of the board is used to reset the microcontroller. It is used to Resets the microcontroller.
Analog Pins: The pins A0 to A5 are used as an analog input and it is in the range of 0-5V.
Digital Pins: The pins 0 to 13 are used as a digital input or output for the arduino board
Serial Pins: These pins are also known as a UART pin. It is used for communication between the arduino board and a
computer or other devices. The transmitter pin number 1 and receiver pin number 0 is used to transmit and receive the
data resp.
External Interrupt Pins: This pin of the Arduino board is used to produce the External interrupt and it is done by pin
numbers 2 and 3.
PWM Pins: This pins of the board is used to convert the digital signal into an analog by varying the width of the Pulse. The
pin numbers 3,5,6,9,10 and 11 are used as a PWM pin.
SPI Pins: This is the Serial Peripheral Interface pin, it is used to maintain SPI communication with the help of the SPI library.
SPI pins include:
1. SS: Pin number 10 is used as a Slave Select
2. MOSI: Pin number 11 is used as a Master Out Slave In
3. MISO: Pin number 12 is used as a Master In Slave Out
4. SCK: Pin number 13 is used as a Serial Clock
LED Pin: The board has an inbuilt LED using digital pin-13. The LED glows only when the digital pin becomes high.
AREF Pin: This is an analog reference pin of the arduino board. It is used to provide a reference voltage from an external
power supply.

11.5SOFTWARE DOWNLOAD:
*Arduino is a computation tool for sensing and controlling signals.
*It is more convenient and cost effective than using a personal computer pc.
*It’s an open – source system in terms of hardware and software.
*You can download the integrated development environment(IDE)for your own OS form.

https://www.arduino.cc/en/software.

11.6 Tool bar details:


Verify:
Checks code for errors
Upload
Compiles and uploads code to the arduinoi/o board.
New
Creates a new sketch.
Open
Open sketch.
Save

28
Save sketch
Serial monitor
Display serial data being sent from the arduino boar

Arduino code basics:


Commands and other information are sent to LED’s, motors and from sensors through digital and analog input & output
pi

12. PROGRAM

12.1 LED BLINKING:


Void setup()
{
pinMode(13,OUTPUT);
}
Void loop()
{
digitalWrite(13,HIGH); delay(1000);
digitalWrite(13,HIGH);
delay(1000);}

CONNECTION DIAGRAM:

FIG12.1 CONNECTION DIAGRAM OF LED BLINKING

2. BUTTON LED:

29
Void setup()
{
pinMode(pin_no,INPUT); pinMode(13,OUTPUT);
}
Void loop()
{
digitalRead(pin_no);
If { //statement
}
}

CONNECTION DIAGRAM:

FIG12.2 CONNECTION DIAGRAM OF BUTTON LED 12.3


IR SENSORS:

30
FIG12.3 CONNECTION DIAGRAM OF IR SENSORS

12.4ULTROSONIC SENSORS:

pinMode(pin_no,INPUT);
pinMode(pin_no,OUTPUT);
digitalWrite(pin_no,HIGH);
delay(_); digitalWrite(pin_no,LOW);
delay(_);
Duration;
Distance;

CONNECTION DIAGRAM:

FIG12.4 CONNECTION DIAGRAM OF ULTRASONIC SENSORS

12.5 DHI 11

31
#include<dht.h>
#define pin D4;
Void setup
{
//statement
}
Void loop
{
//Statement
}
CONNECTION DIAGRAM:

FIG12.5 CONNECTION DIAGRAM OF DHI 1

13. OUTPUT
13.1HELLO WORLD:

32
FIG 13.1 HELLO WORLD
CODE:

/* LiquidCrystal Library - Hello World


Demonstrates the use a 16x2 LCD display. The LiquidCrystal library
works with all LCD displays that are compatible with the Hitachi
HD44780 driver. There are many of them out there, and you can
usually tell them by the 16-pin interface. This sketch prints "Hello
World!" to the LCD and shows the time.

The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008 by


David A. Mellis library modified 5 Jul
2009 by Limor Fried
(http://www.ladyada.net) example

33
added 9 Jul 2009 by Tom Igoe modified
22 Nov 2010 by Tom Igoe

This example code is in the public domain. http://www.arduino.cc/en/Tutorial/LiquidCrystal


*/// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() {
// set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello,
world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}

13.2 PUSH BUTTON:

FIG 13.2 PUSH BUTTON


CODE:

int pinButton = 8; long


t = 0;

34
int i = 0; void setup(){
Serial.begin(9600);
pinMode(pinButton, INPUT);
for(int e =9;e < 14; e++){
pinMode(e, OUTPUT);
}
}
void loop(){ t++; if
(t%20==0){
digitalWrite(i+9,HIGH);
i++;
}
if(digitalRead(pinButton)==HIGH){
i=0; for(int e =9;e < 14;
e++){digitalWrite(e,LOW);
}
}
Serial.print(i);
Serial.print("");
Serial.print(digitalRead(pinButton));
Serial.print("");
Serial.println(t);
delay(1);
}

13.3 FORCE SENSORS WITH6 LEDS

FIG 13.3 LEDS


CODE:
35
#definefsrpin A0
#define led1 2
#define led2 3
#define led3 4
#define led4 5
#define led5 6
#define led6 7

int fsrreading; void


setup() { Serial.
begin(9600);

pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(led6, OUTPUT);
}
void loop() {

fsrreading = analogRead(fsrpin);

Serial.println(fsrreading);

if (fsrreading > 200) {


digitalWrite(led1, HIGH);
}
else digitalWrite(led1, LOW);
if (fsrreading > 450) {
digitalWrite(led2, HIGH);
}
else digitalWrite(led2, LOW);
36
if (fsrreading > 550) {
digitalWrite(led3, HIGH);
}
else digitalWrite(led3, LOW);
if (fsrreading > 650) {
digitalWrite(led4, HIGH);
}
else digitalWrite(led4, LOW);
if (fsrreading > 800) {
digitalWrite(led5, HIGH);
}
else digitalWrite(led5, LOW);
if (fsrreading > 900) {
digitalWrite(led6, HIGH);
}
else digitalWrite(led6, LOW);
}

13.4 Soil Moisture Sensor

FIG 13.4 Soil Moisture Sensor


CODE:

const int sensorpin = A0;


const int sensorpower = 8;
const int LED1 = 2;

37
const int LED2 = 3;
const int LED3 = 4;

// variable for sensor reading


int sensor;
const int delayTime = 1000;

// "wet" and "dry" thresholds - these require calibration


int wet = 800;
int dry = 500;

void setup(){ // code that only runs once


// set pins as outputs
pinMode(LED1,OUTPUT);
pinMode(LED2,OUTPUT);
pinMode(LED3,OUTPUT);
pinMode(sensorpower,OUTPUT);

// initialize serial communication


Serial.begin(9600);
}

void loop(){ // code that loops forever


// power on sensor and wait briefly
digitalWrite(sensorpower,HIGH);
delay(10);
// take reading from sensor
sensor = analogRead(sensorpin);
// turn sensor off to help prevent corrosion
digitalWrite(sensorpower,LOW);

// print sensor reading


Serial.println(sensor);

// If sensor reading is greater than "wet" threshold,


// turn on the blue LED. If it is less than the "dry"
// threshold, turn on the red LED. If it is in between
// the two values, turn on the yellow LED.

38
if(sensor>wet){
digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
digitalWrite(LED3,HIGH);
}
else if(sensor<dry){
digitalWrite(LED1,HIGH);
digitalWrite(LED2,LOW);
digitalWrite(LED3,LOW);
}
else{
digitalWrite(LED1,LOW);
digitalWrite(LED2,HIGH);
digitalWrite(LED3,LOW);
}

// wait before taking next reading


delay(delayTime);

13.5 Servo motor with potentiometer

FIG 13.5 Servo motor with potentiometer


CODE:

#include <Servo.h>
Servo servoMotor;
int potPos;
39
void setup() {
servoMotor.attach(9);
}
void loop () {
potPos = map(analogRead(A0), 0,
1023, 0, 180);
servoMotor.write(potPos);
delay(15);
}

13.6 TMP36 Temperature Sensor With Arduino

FIG 13.6 TMP36 Temperature Sensor With Arduino

CODE:

int baselineTemp = 0;
int celsius = 0;
int fahrenheit = 0;

void setup()
{
pinMode(A0, INPUT);
Serial.begin(9600);

pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);

40
}

void loop()
{
baselineTemp = 40;

celsius = map(((analogRead(A0) -
20) * 3.04), 0, 1023, -40, 125);

fahrenheit = ((celsius * 9) / 5 + 32);


Serial.print(celsius);
Serial.print(" C, ");
Serial.print(fahrenheit);
Serial.println(" F");

if (celsius < baselineTemp) {


digitalWrite(2, LOW);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
}
if (celsius >= baselineTemp &&
celsius < baselineTemp + 10) {
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
}
if (celsius >= baselineTemp + 10 &&
celsius < baselineTemp + 20) {
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
}
if (celsius >= baselineTemp + 20 &&
celsius < baselineTemp + 30) {
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
}

41
if (celsius >= baselineTemp + 30) {
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
}
delay(1000);
}

13.7 Control of 4 DC Motors with L293D

FIG 13.7 Control of 4 DC Motors with L293D


CODE:

int intervalTime = 3000; // Time


interval for each movement

void setup() {
// Initialize motor control pins as
OUTPUT
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
}

void loop() {
// Move Forward
digitalWrite(13, LOW);
digitalWrite(12, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
42
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
delay(intervalTime); // Wait for the
specified time

// Move Right Forward


digitalWrite(13, LOW);
digitalWrite(12, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(6, LOW);
digitalWrite(7, HIGH);
delay(intervalTime); // Wait for the
specified time

// Move Left Forward


digitalWrite(13, LOW);
digitalWrite(12, LOW);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(6, LOW);
digitalWrite(7, LOW);
delay(intervalTime); // Wait for the
specified time

// Move Backward
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
digitalWrite(11, LOW);
digitalWrite(10, HIGH);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
digitalWrite(7, LOW);
digitalWrite(6, HIGH);
delay(intervalTime); // Wait for the
specified time

// Move Right Backward


digitalWrite(12, LOW);
digitalWrite(13, HIGH);
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
digitalWrite(8, LOW);
digitalWrite(7, LOW);
digitalWrite(6, HIGH);
delay(intervalTime); // Wait for the
specified time

// Move Left Backward


digitalWrite(12, LOW);
digitalWrite(13, LOW);
digitalWrite(11, LOW);
43
digitalWrite(10, HIGH);
digitalWrite(9, LOW);
digitalWrite(8, HIGH);
digitalWrite(7, LOW);
digitalWrite(6, LOW);
delay(intervalTime); // Wait for the
specified time
}

13.8 PIR SENSOR WITH LED

FIG 13.8 PIR SENSOR WITH LED


CODE:

int sensorState = 0;

void setup()
{
pinMode(2, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
// read the state of the
sensor/digital input
sensorState = digitalRead(2);
// check if sensor pin is HIGH. if it is,
set the
// LED on.
if (sensorState == HIGH) {
digitalWrite(LED_BUILTIN, HIGH);
} else {
digitalWrite(LED_BUILTIN, LOW);
}
delay(10); // Delay a little bit to
improve simulation performance

44
14.1 ADVANTAGE OF IOT:
*Efficient resource utilization: If we know the functionality and the way that how each device work we definitely
increase the efficient resource utilization as well as monitor natural resources.
*Minimize human effort: As the devices of IOT interact and communicate with each other and do lot of task for us,
then they minimize the human effort.
*Save time: As it reduces the human effort then it definitely saves out time. Time is the primary factor which can save
through IOT platform.
*Improve security: Now, if we have a system that all these things are interconnected then we can make the system
more secure and efficient.

14.2 DIS ADVANTAGE OF IOT:


*Security: As the IOT systems are interconnected and communicate over networks. The system offers little control despite
any security measures, and it can be lead the various kinds of network attacks.
*Privacy: Even without the active participation on the user, the IOT system provides substantial personal data in maximum
detail.
*Complexity: The designing, developing, and maintaining and enabling the large technology to IOT system is quite
complicated.

15.CONCLUTION:

*In conclusion, internet of things is the concept in which the virtual world of information technology connected to the real
world of things.
*The Internet of Things is happening now, and there is a need to address its challenges and maximize its benefits while
reducing its risks.
*The Internet Society cares about IOT because it represents a growing aspect of how people and institutions are likely to
interact with and incorporate the Internet and network connectivity into their personal, social, and economic lives.
*Solutions to maximizing the benefits of IOT while minimizing the risks will not be found by engaging in a polarized debate
that pits the promises of IOT against its possible perils.
*Rather, it will take informed engagement, dialogue, and collaboration across a range of stakeholders to plot the most
effective ways forward.

45

You might also like