Wall Climbing Robot
Wall Climbing Robot
Wall Climbing Robot
Report on
WALL CLIMBING SURVEILLANCE ROBOT
Submitted by
SHIPRA SINGH 16900314099
SHIWANY PAREEK 16900314100
MONOMITA MANDAL 16900314063
NEHA GUPTA 16900314067
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
from
ACADEMY OF TECHNOLOGY
Under the guidance of
PROF. SANJIB MITRA
Academy of Technology
Aedconagar, Hooghly712121
1
ACKNOWLEDGEMENT
Finally I must say that no height is ever achieved without some sacrifices made
at some point of time and it is here I owe my special debt to my parents
and family members for showing their love and constant support
throughout this period of time.
2
ABSTRACT
3
TABLE OF CONTENTS
Certificate...............................................................................................(2)
Acknowledgement..................................................................................(3)
Abstract..................................................................................................(5)
Introduction on Wall Climbing Robot......................................................(6-7)
Introduction on Arduino......................................................................(8-9)
Benefits of ...............................................................................(12)
Applications of Arduino........................................................................(13)
Programs using Arduino..................................................................(14-53)
Sensor design Projects.....................................................................(54-66)
Mini Projects...................................................................................(67-75)
Advantages of Embedded System.........................................................(76)
Disadvantages of Embedded System.....................................................(77)
Future Scope of Arduino.......................................................................(78)
Conclusion............................................................................................(79)
References/ Bibliography......................................................................(80)
4
INTRODUCTION ON WALL CLIMBING
ROBOT
Since the embedded system is dedicated to specific tasks, design engineers can
optimize it to reduce the size and cost of the product and increase the
reliability and performance. Some embedded systems are mass-produced,
benefiting from economies of scale. Properties typical of embedded computers
when compared with general-purpose ones are low power consumption, small
size, rugged operating ranges and low per-unit cost.
Commercial embedded systems range from digital watches and MP3 players to
giant routers and switches. Complexities vary from single processor chips to
advanced units with multiple processing chips.
6
INTRODUCTION ON ARDUINO
The first Arduino was introduced in 2005, aiming to provide a low cost, easy
way for novices and professionals to create devices that interact with their
environment using sensors and actuators. Common examples of such devices
intended for beginner hobbyists include simple robots, thermostats, and
motion detectors.
Over the years Arduino has been the brain of thousands of projects, from
everyday objects to complex scientific instruments. A worldwide community of
makers - students, hobbyists, artists, programmers, and professionals - has
gathered around this open-source platform, their contributions have added up
7
to an incredible amount of accessible knowledge that can be of great help to
novices and experts alike.
Arduino Uno:
Pin Diagram :
8
INTRODUCTION ON ATMEGA-328
Specifications:
The Atmel 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash
memory with read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23
general purpose I/O lines, 32 general purpose working registers, three flexible
timer/counters with compare modes, internal and external interrupts, serial
programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, 6-
channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages),
programmable watchdog timer with internal oscillator, and five software
selectable power saving modes. The device operates between 1.8-5.5 volts.
The device achieves throughput approaching 1 MIPS per MHz.
Features:
Microcontroller ATmega-328
Operating Voltage 5V
Input Voltage(recommended) 7-12V
Input Voltage(limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM pins)
Analog Input Pins 8
DC Current per I/O Pin 40mA
DC Current for 3.3V pins 50mA
Flash Memory 32KB (of which 2KB used for bootloader)
SRAM 2KB
EEPROM 1KB
Clock Speed 16 MHz
9
Pin Diagram:
10
BENEFITS OF ARDUINO-UNO
11
APPLICATIONS OF ARDUINO
Light Control
Home Automation
Robotics
Networking
Xoscillo, an open-source oscilloscope
Scientific equipment such as the Chemduino
Arduinome, a MIDI controller device that mimics the Monome
OBDuino, a trip computer that uses the on-board diagnostics interface
found in most modern cars
Ardupilot, drone software and hardware
ArduinoPhone, a do-it-yourself cellphone
GertDuino, an Arduino mate for the Raspberry Pi
Water quality testing platform
Homemade CNC using Arduino and DC motors with close loop control by
Homofaciens
DC motor control using Arduino and H-Bridge.
12
Circuit to blink the Default LED present in Arduino
13
PROGRAMS
01. Program to blink the Default LED present in Arduino
void setup()
pinMode(13,OUTPUT);
void loop()
digitalWrite(13,HIGH);
delay(1000);
digitalWrite(13,LOW);
delay(1000);
14
Circuit to glow multiple LEDs present in the breadboard using arduino
int red=11,green=10,blue=9;
void setup()
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
void loop()
digitalWrite(red,HIGH);
delay(500);
digitalWrite(red,LOW);
15
delay(500);
digitalWrite(green,HIGH);
delay(500);
digitalWrite(green,LOW);
delay(500);
digitalWrite(blue,HIGH);
delay(500);
digitalWrite(blue,LOW);
delay(500);
digitalWrite(green,HIGH);
delay(500);
digitalWrite(green,LOW);
16
Circuit to glow multiple LEDs using switch(button) as input
int red=11,green=10,blue=9,switch=12;
void setup()
{
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(switch,INPUT);
Serial.begin(9600);
}
17
void loop()
{
int value=digitalRead(switch);
Serial.println(value);
if(value==1)
{
digitalWrite(red,HIGH);
delay(500);
digitalWrite(red,LOW);
digitalWrite(green,HIGH);
delay(500);
digitalWrite(green,LOW);
digitalWrite(blue,HIGH);
delay(500);
digitalWrite(blue,LOW);
digitalWrite(green,HIGH);
delay(500);
digitalWrite(green,LOW);
}
else
{
digitalWrite(red,LOW);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
}
}
18
Circuit to turn on multiple LEDs when the button is pressed and let it on
when the button is released
04.Program to turn on multiple LEDs when the button is pressed and let it
on when the button is released
int red=11,green=10,blue=9,switch=12,cnt=0;
void setup()
{
19
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(switch,INPUT);
Serial.begin(9600);
void loop()
int btst=digitalRead(switch);
Serial.println(btst);
if(btst==1)
cnt=cnt+1;
switch(cnt)
case 1: digitalWrite(red,HIGH);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
break;
case 2: digitalWrite(green,HIGH);
digitalWrite(blue,LOW);
digitalWrite(red,LOW);
break;
case 3: digitalWrite(blue,HIGH);
digitalWrite(red,LOW);
digitalWrite(green,LOW);
break;
20
case 4: digitalWrite(green,HIGH);
digitalWrite(red,LOW);
digitalWrite(blue,LOW);
break;
delay(500);
if(cnt>=4)
cnt=0;
else
cnt=0;
digitalWrite(red,LOW);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
21
Circuit to fade up and fade down an LED
void setup()
{
void loop()
{
for(i=0;i<=255;i++)
22
{
level=i;
analogWrite(red,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(red,level);
delay(10);
}
}
23
06.Program to fade up and fade down multiple LEDs
int i,j,level,red=11,green=10,blue=9;
void setup()
{
}
void loop()
{
for(i=0;i<=255;i++)
{
level=i;
analogWrite(red,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(red,level);
delay(10);
}
for(i=0;i<=255;i++)
{
level=i;
analogWrite(green,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(green,level);
delay(10);
}
for(i=0;i<=255;i++)
{
level=i;
analogWrite(blue,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(blue,level);
delay(10);
}
}
24
Circuit to fade up an LED using potentiometer
int i,j,red=9;
void setup()
Serial.begin(9600);
void loop()
25
{
i=analogRead(A5);
Serial.print(i);
j=map(i,0,1023,0,255);
Serial.print('\t');
Serial.print(j);
Serial.println();
analogWrite(red,j);
26
Circuit to blink LED and produce sound of the buzzer of an ambulance
int red=10,green=9,buz=8;
void setup()
pinMode(buz,OUTPUT);
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
}
27
void loop()
tone(buz,500);
digitalWrite(red,HIGH);
digitalWrite(green,LOW);
delay(500);
tone(buz,700);
digitalWrite(green,HIGH);
digitalWrite(red,LOW);
delay(500);
28
9.Program to produce the sound of siren
int freq,buz=8;
void setup()
pinMode(buz,OUTPUT);
void loop()
for(freq=500;freq<=1500;freq+=10)
tone(buz,freq);
delay(10);
for(freq=1500;freq>=500;freq-=10)
tone(buz,freq);
delay(10);
29
Circuit to fade up and fade down an LED using switch button and let it on the
same intensity when the switch is released
10.Program to fade up and fade down an LED using switch button and let it
on the same intensity when the switch is released
int i=0,flag=1,red=9,switch=12,btst;
void setup()
{
pinMode(red,OUTPUT);
pinMode(switch,INPUT);
Serial.begin(9600);
}
void loop()
{
btst=digitalRead(switch);
30
Serial.println(btst);
if(btst==1)
{
if(flag==1)
{
i++;
if(i==255)
{
flag=0;
}
}
else
{
i--;
if(i==0)
flag=1;
}
}
analogWrite(red,i);
delay(10);
}
31
Circuit to fade up and fade down multiple LEDs using switch button and
let it on the same intensity when the switch is released.
11.Program to fade up and fade down multiple LEDs using switch button
and let it on the same intensity when the switch is released.
int i=0,flag=1,btst,cnt=0;
int bulb[]={11,10,9,10};
void setup()
{
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
pinMode(12,INPUT);
32
Serial.begin(9600);
}
void loop()
{
btst=digitalRead(12);
if(btst==1)
{
if(flag==1)
{
i++;
if(i==255)
{
flag=0;
}
}
else
{
i--;
if(i==0)
{
flag=1;
cnt++;
digitalWrite(bulb[cnt-1],LOW);
}
}
}
Serial.print(btst);
Serial.print(\t);
Serial.println(i);
delay(10);
analogWrite(bulb[cnt],i);
if(cnt==4)
{
cnt=0;
}
}
33
Circuit to spin the DC motor using potentiometer
int i,mtr;
void setup()
Serial.begin(9600);
}
34
void loop()
i=analogRead(A5);
Serial.print(i);
mtr=map(i,0,1023,0,255);
Serial.print('\t');
Serial.print(i);
Serial.println();
analogWrite(A4,mtr);
35
Circuit to display Hello World on the screen of LCD
#include <LiquidCrystal.h>
void setup()
lcd.begin(16, 2);
36
lcd.print("hello, world!");
void loop()
lcd.setCursor(0,1);
lcd.print(millis() / 1000);
37
Circuit of tank level indicator using potentiometer
int value,level,i,j,freq,red=11,green=10,blue=9,buz=8;
void setup()
{
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(buz,OUTPUT);
Serial.begin(9600);
38
Serial.println();
Serial.print("Value");
}
void loop()
{
Serial.println();
value=analogRead(A5);
Serial.print(value);
Serial.print('\t');
noTone(buz);
if(value<=10)
{
Serial.print("Empty");
digitalWrite(red,HIGH);
tone(buz,700);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
}
if(value>10&&value<=200)
{
Serial.print("Low Level");
digitalWrite(red,HIGH);
tone(buz,700);
delay(500);
digitalWrite(red,LOW);
noTone(buz);
delay(500);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
}
if(value>200&&value<=450)
{
Serial.print("Low Medium");
for(i=0;i<=255;i++)
{
level=i;
analogWrite(blue,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(blue,level);
delay(10);
}
digitalWrite(red,LOW);
digitalWrite(green,LOW);
39
}
if(value>450&&value<=550)
{
Serial.print("Medium");
digitalWrite(green,HIGH);
digitalWrite(red,LOW);
digitalWrite(blue,LOW);
}
if(value>550&&value<=800)
{
Serial.print("Upper Medium");
for(i=0;i<=255;i++)
{
level=i;
analogWrite(blue,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(blue,level);
delay(10);
}
digitalWrite(green,HIGH);
digitalWrite(red,LOW);
}
if(value>800&&value<=1000)
{
Serial.print("High Level");
digitalWrite(red,HIGH);
digitalWrite(green,HIGH);
tone(buz,700);
delay(500);
digitalWrite(red,LOW);
digitalWrite(green,LOW);
noTone(buz);
delay(500);
digitalWrite(blue,LOW);
}
if(value>1000)
{
Serial.print("Full");
digitalWrite(red,HIGH);
for(freq=500;freq<=900;freq+=10)
{
tone(buz,freq);
delay(10);
}
for(freq=900;freq>=500;freq-=10)
{
40
tone(buz,freq);
delay(10);
}
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
}
}
41
Circuit to sweep the Servo Motor
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup()
42
{
Serial.begin(9600);
myservo.attach(9);
void loop()
myservo.write(pos);
Serial.println(pos);
delay(15);
myservo.write(pos);
Serial.println(pos);
delay(15);
43
Circuit to sweep the Servo Motor using potentiometer (knob)
#include <Servo.h>
Servo myservo;
int val;
void setup()
44
{
myservo.attach(9);
void loop()
val = analogRead(A5);
myservo.write(val);
delay(15);
45
Circuit to sweep the Servo Motor using switch knob and let it be on the same
position when the switch is released.
17.Program to sweep the Servo Motor using switch knob and let it be on the
same position when the switch is released.
int value,flag=1,swt=12;
#include <Servo.h>
Servo myservo;
int pos = 0;
46
void setup()
{
Serial.begin(9600);
myservo.attach(9);
pinMode(swt,INPUT);
}
void loop()
{
value=digitalRead(swt);
Serial.print(value);
Serial.print('\t');
if(value==1)
{
if(flag==1)
{
pos++;
if(pos==180)
{
flag=0;
}
}
else
{
pos--;
if(pos==0)
{
flag=1;
}
}
myservo.write(pos);
Serial.print(pos);
}
else
{
Serial.print(pos);
}
Serial.println();
delay(15);
}
47
Circuit to sweep the Servo Motor using switch knob and let it be on the same
position when the switch is released and count the number of times when
the switch is off and display the motor position.
18.Program to sweep the Servo Motor using switch knob and let it be on the
same position when the switch is released and count the number of times
when the switch is off and display the motor position.
#include <Servo.h>
Servo myservo;
int value,flag=1,cnt=0,pos=0,last_val,swt=12;
48
void setup()
{
Serial.begin(9600);
myservo.attach(9);
}
void loop()
{
value=digitalRead(swt);
Serial.print(value);
Serial.print('\t');
if(value==1)
{
if(flag ==1)
{
pos++;
if(pos==180)
{
flag=0;
}
}
else
{
pos--;
if(pos==0)
{
flag=1;
}
}
myservo.write(pos);
}
last_val=digitalRead(swt);
if(last_val<1)
{
cnt=cnt+1;
Serial.print(pos);
Serial.print("\t");
Serial.print(cnt);
}
Serial.println();
delay(15);
}
49
Circuit of galvanometer with reference position= 90
#include <Servo.h>
Servo myservo;
int pos=90,flag=1,value,toggle=0,swt=12;
void setup()
{
50
myservo.attach(9);
pinMode(swt,INPUT);
Serial.begin(9600);
}
void loop()
{
value=digitalRead(swt);
Serial.print(value);
Serial.print(\t);
if(value==1)
{
if(flag==1)
{
f1();
}
else
{
f2();
}
toggle=1;
}
else
{
if(toggle==1)
{
toggle=0;
if(flag==1)
flag=0;
else
flag=1;
}
go_to_90();
}
}
void f1()
{
if(pos<180)
pos++;
myservo.write(pos);
Serial.print(pos);
Serial.print(\t);
delay(25);
}
void f2()
{
if(pos>0)
pos--;
myservo.write(pos);
Serial.print(pos);
Serial.print(\t);
51
delay(25);
}
void go_to_90()
{
if(pos>90)
pos--;
else if(pos<90)
pos++;
myservo.write(pos);
Serial.print(pos);
Serial.println();
delay(25);
}
52
SENSOR DESIGN PROJECTS
int i,j,red=9;
void setup()
{
53
Serial.begin(9600);
void loop()
i=analogRead(A5);
Serial.print(i);
j=map(i,0,800,0,255);
Serial.print('\t');
Serial.print(j);
Serial.println();
analogWrite(red,j);
54
Circuit to glow an LED according to the range of an LDR
int i,j,red=9;
void setup()
{
Serial.begin(9600);
}
void loop()
{
i=analogRead(A5);
Serial.print(i);
55
if(i<200)
{
Serial.print('\t');
Serial.print("Dark");
Serial.println();
}
if(i>=200&&i<=400)
{
Serial.print('\t');
Serial.print("Intermediate");
Serial.println();
if(i>400&&i<=600)
{
Serial.print('\t');
Serial.print("Medium");
Serial.println();
}
if(i>600)
{
Serial.print('\t');
Serial.print("Bright");
Serial.println();
}
analogWrite(red,i);
}
56
Circuit to design an indicator using LDR
int i,j,red=11,green=10,blue=9,buz=8;
void setup()
{
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(buz,OUTPUT);
Serial.begin(9600);
}
void loop()
{
57
i=analogRead(A0);
Serial.print(i);
if(i<200)
{
Serial.print('\t');
Serial.print("Dark");
Serial.println();
analogWrite(red,i);
tone(buz,300);
delay(500);
noTone(buz);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
}
if(i>400&&i<=600)
{
Serial.print('\t');
Serial.print("Medium");
Serial.println();
analogWrite(blue,i);
digitalWrite(green,LOW);
digitalWrite(red,LOW);
}
if(i>600)
{
Serial.print('\t');
Serial.print("Bright");
Serial.println();
analogWrite(green,i);
tone(buz,700);
delay(500);
noTone(8);
digitalWrite(blue,LOW);
digitalWrite(red,LOW);
}
}
58
Circuit to obtain the temperature in diferent scales using temperature
sensor
59
04.Program to obtain the temperature in diferent scales using
temperature sensor
int value,celsius,kelvin;
float far,cons=0.48828125;
void setup()
Serial.begin(9600);
Serial.println();
Serial.print("value\tCel\tFahr\tKelvin");
void loop()
Serial.println();
value=analogRead(A5);
Serial.print(value);
celsius=value*cons;
Serial.print('\t');
Serial.print(celsius);
far=((9.0/5)*celsius)+32;
Serial.print('\t');
Serial.print(far);
kelvin=celsius +273;
Serial.print('\t');
Serial.print(kelvin);
Serial.println();
60
Circuit of temperature alarm indicator
61
05.Program to design a temperature alarm indicator
int value,celsius,level,i,j,freq,red=11,green=10,blue=9,buz=8;
float cons=0.48828125;
void setup()
{
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(buz,OUTPUT);
Serial.begin(9600);
Serial.println();
Serial.print("value\tCel");
}
void loop()
{
Serial.println();
value=analogRead(A5);
Serial.print(value);
celsius=value*cons;
Serial.print('\t');
Serial.print(celsius);
Serial.print('\t');
noTone(buz);
if(celsius>=40)
{
Serial.print("Excess Heat");
digitalWrite(red,HIGH);
tone(buz,900);
delay(500);
noTone(buz);
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
}
if(celsius>=35&&celsius<40)
{
Serial.print("Warm");
tone(buz,900);
digitalWrite(blue,HIGH);
digitalWrite(red,HIGH);
delay(500);
digitalWrite(red,LOW);
noTone(buz);
delay(500);
digitalWrite(green,LOW);
}
if(celsius>=27&&celsius<35)
{
Serial.print("Moderate");
62
for(i=0;i<=255;i++)
{
level=i;
analogWrite(blue,level);
delay(10);
}
for(j=255;j>=0;j--)
{
level=j;
analogWrite(blue,level);
delay(10);
}
digitalWrite(red,LOW);
digitalWrite(green,LOW);
}
if(celsius<27)
{
Serial.print("Cold");
digitalWrite(green,HIGH);
delay(500);
digitalWrite(green,LOW);
delay(500);
for(freq=500;freq<=900;freq+=10)
{
tone(buz,freq);
delay(10);
}
for(freq=900;freq>=500;freq-=10)
{
tone(buz,freq);
delay(10);
}
digitalWrite(red,LOW);
digitalWrite(blue,LOW);
}
}
63
Circuit to observe the values of gas sensor using different gases
64
06.Program to observe the values of gas sensor using different gases
int value;
void setup()
Serial.begin(9600);
Serial.println();
Serial.print("value");
void loop()
Serial.println();
value=analogRead(A0);
Serial.print(value);
65
MINI PROJECTS
int ld,ldr,gas,value,celsius,mtr,red=15,blue=16,buz=9;
float cons=0.48828125;
#include <LiquidCrystal.h>
void setup()
{
pinMode(red,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(buz,OUTPUT);
Serial.begin(9600);
lcd.begin(16, 2);
Serial.println();
Serial.print(LDR\tGAS\tTEMP);
}
66
void loop()
{
Serial.println();
ld=analogRead(A5);
Serial.print(ld);
gas=analogRead(A0);
Serial.print('\t');
Serial.print(gas);
value=analogRead(A3);
celsius=value*cons;
Serial.print('\t');
Serial.print(celsius);
Serial.print('\t');
noTone(buz);
if(ld<200)
{
analogWrite(blue,255);
digitalWrite(red,HIGH);
lcd.setCursor(0, 0);
lcd.print(" Low Light ");
}
if(ld>=200&&ld<500)
{
ldr=map(ld,200,500,255,200);
analogWrite(blue,ldr);
digitalWrite(red,LOW);
lcd.setCursor(0,0);
lcd.print(" ");
}
if(ld>=500&&ld<800)
{
ldr=map(ld,500,800,150,0);
analogWrite(blue,ldr);
digitalWrite(red,LOW);
lcd.setCursor(0,0);
lcd.print(" ");
}
if(gas>=300&&gas<500)
{
lcd.setCursor(0,0);
lcd.print(" CHECK GAS ");
digitalWrite(blue,LOW);
digitalWrite(red,HIGH);
tone(buz,700);
delay(500);
digitalWrite(red,LOW);
noTone(buz);
delay(500);
}
if(gas>=500)
{
67
lcd.setCursor(0,0);
lcd.print(" GAS LEAK ");
digitalWrite(blue,LOW);
digitalWrite(red,HIGH);
tone(buz,700);
}
if(celsius>=27&&celsius<30)
{
lcd.setCursor(0,1);
lcd.print("COLD ");
lcd.print(celsius);
lcd.print(Celsius );
mtr=map(value,27,30,30,100);
analogWrite(A4,mtr);
}
if(celsius>=30&&celsius<33)
{
lcd.setCursor(0,1);
lcd.print("WARM ");
lcd.print(celsius);
lcd.print(Celsius );
mtr=map(value,30,33,100,255);
analogWrite(A4,mtr);
}
if(celsius>=33&&celsius<35)
{
lcd.setCursor(0,1);
lcd.print("HEAT );
lcd.print(celsius);
lcd.print(Celsius );
digitalWrite(blue,LOW);
digitalWrite(red,HIGH);
tone(buz,900);
delay(500);
digitalWrite(red,LOW);
noTone(buz);
delay(500);
}
if(celsius>=35)
{
lcd.setCursor(0,1);
lcd.print("FIRE ALERT ");
lcd.print(celsius);
lcd.print(C );
digitalWrite(blue,LOW);
digitalWrite(red,HIGH);
tone(buz,900);
}
}
68
Circuit for RAILWAY GATE CONTROL
#include<Servo.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 8, 7, 4, 3, 2);
Servo myservo;
int value,pos=90,flag=1,swt=9,buz=6,red=14,green=15,blue=16;
void setup()
{
Serial.begin(9600);
69
lcd.begin(16, 2);
myservo.attach(5);
pinMode(buz,OUTPUT);
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
pinMode(swt,INPUT);
}
void loop()
{
value=digitalRead(swt);
Serial.print(value);
Serial.print("\t");
noTone(buz);
if(value==1)
{
if(flag=1)
{
if(pos>0)
{
pos--;
myservo.write(pos);
Serial.print(pos);
Serial.println();
delay(5);
lcd.setCursor(0, 0);
lcd.print(" Train Alert ");
digitalWrite(red,LOW);
digitalWrite(green,LOW);
digitalWrite(blue,HIGH);
tone(buz,700);
delay(100);
noTone(buz);
delay(100);
}
if(pos==0)
{
digitalWrite(green,LOW);
digitalWrite(blue,LOW);
digitalWrite(red,HIGH);
tone(buz,700);
lcd.setCursor(0, 0);
lcd.print(" Train Pass ");
}
}
flag=0;
}
70
else
{
if(pos<90)
{
pos++;
myservo.write(pos);
Serial.print(pos);
Serial.println();
delay(5);
lcd.setCursor(0, 0);
lcd.print(" Train Alert ");
digitalWrite(red,LOW);
digitalWrite(green,LOW);
digitalWrite(blue,HIGH);
tone(buz,700);
delay(100);
noTone(buz);
delay(100);
}
if(pos==90)
{
digitalWrite(green,HIGH);
digitalWrite(blue,LOW);
digitalWrite(red,LOW);
lcd.setCursor(0, 0);
lcd.print(" Vehicles pass ");
}
flag=1;
}
Serial.println();
}
71
Circuit for AUTOMATIC RAILWAY GATE CONTROL
#include <Servo.h>
Servo myservo;
int red=14,green=15,blue=16,sw1=9,ir=3,buz=6;
int flag=1,pos=90,k1,k2;
int gt,cnt=0;
int prev1=0,now1=0,prev2=0,now2=0;
int down=0;
72
void setup()
{
myservo.attach(5);
pinMode(sw1,INPUT);
pinMode(ir,INPUT);
pinMode(red,OUTPUT);
pinMode(green,OUTPUT);
pinMode(blue,OUTPUT);
Serial.begin(9600);
}
void loop()
{
if(pos>=90)
{
digitalWrite(green,HIGH);
digitalWrite(blue,LOW);
digitalWrite(red,LOW);
noTone(buz);
}
else if(pos<=0)
{
digitalWrite(red,HIGH);
digitalWrite(blue,LOW);
digitalWrite(green,LOW);
tone(buz,700);
}
else
{
digitalWrite(blue,HIGH);
digitalWrite(red,LOW);
digitalWrite(green,LOW);
tone(buz,900);
delay(100);
noTone(buz);
delay(50);
}
Serial.print(pos);
Serial.print("\t");
k1=digitalRead(sw1);
k2=digitalRead(ir);
Serial.print(k1);
Serial.print("\t");
Serial.print(k2);
Serial.print("\t");
if(cnt==0)
{
if(k1==1)
{
sw1=9;
73
ir=3;
}
else if(k2==1)
{
ir=9;
sw1=3;
int tmp=k1;
k1=k2;
k2=tmp;
}
}
prev1=now1;
prev2=now2;
now1=k1;
now2=k2;
if(prev1!=now1)
cnt++;
if(prev2!=now2)
cnt--; // COUNTED
if(cnt>0)
down=1;
else
down=0; //decided to go down
if(down==1)
{
if(pos>0)
pos--;
}
if(down==0)
{
if(pos<90)
pos++;
}
myservo.write(pos);
delay(15);
Serial.println(cnt/2)
}
74
ADVANTAGES OF EMBEDDED SYSTEM
75
DISADVANTAGES OF EMBEDDED SYSTEM
2. Issue of scalability
3. Limitation of hardware
5. Hard to maintain.
6. Doesnt evolve with technology improvement.
7. Hard to carry files from one machine to another.
8. Hard to backup embedded files.
76
FUTURE SCOPE OF ARDUINO
The Arduino board is for anyone who wants to build a basic level of intelligence
into an object. Once programmed, it can read sensors, make simple decisions,
and control myriad devices in the real world.
Arduino was basically designed to make the process of using electronics in
multidisciplinary projects more accessible. It is intended for artists, designers,
hobbyists, and anyone interested in creating interactive objects or
environment.
Arduino is used by all class of people in a different way. Some students use it in
their projects, some using arduino for fun, some went out to become
entreupreuners. This only shows how useful is this tiny device.
Arduino is spreading rapidly across the globe .Arduino is actually an open
source hardware project that can be programmed to read temperatures,
control a motor, and sense touch.
Thousands of projects have been done worldwide using this tiny little device.
Some of which to mention are:
77
CONCLUSION
Over the years, Arduino has went out to become a huge success and a
common name among students. With Google deploying it, peoples
imagination has went out to much higher level than before. A developer in the
annual GOOGLE IO conference said when Arduino and Android coming
together, this really proves INFINITY EXISTS in the future.
A study on arduino and practical experiments on arduino must be added for
UG courses of engineering, to help students to leverage their talents, and
imagination.
Therefore, by using the Arduino we can put together both software and
hardware .Arduino will be the most useful interface between the software and
the hardware in future. In summary, this arduino concept is a good software
hardware co-design practice.
78
BIBLIOGRAPHY
79