Professional Documents
Culture Documents
REPORT ON
"RO).MR.THOKA* SIR
S.S.JON&HA*E "O*YTECHNIC
AMBERNATH 2010-2011
Co+te+ts
To,ic
"RE)ACE ACKNO/*E&(EMENT ABOUT 0ISUA* BASIC ABOUT "ROJECT SENSOR AN& CIRCUIT "O/ER SU""*Y "ARA**E* "ORT (SM MO&EM SYSTEM RE4UIREMENT )*O/ CHART SCREEN SHOTS "ROJECT CO&E MO&I)ICATION AN& A""*ICATION BIB*IO(RA"HY &ATASHEETS 2 2 #2 #3 #$ # 1 21 22 23
"-.e.No
2
"RE)ACE
"RE)ACE
!t as all
software witho!t a hardware is so!l witho!t ody. As the tendency of the st!dent ehind the "ro#ect is to $et %ar&s and see to that 'ery less ti%e is s"end, !t fa%e doesn(t co%e within a day, as is the "ro#ect wor&, this "ro#ect is ta&en y !s considerin$ the followin$ "oint what we st!died is only oo&ish can we i%"le%ent this how hardware can e i%"le%ented !sin$ software whether what we ha'e st!died is only for st!dy "!r"ose and scorin$ the %ar&s can e %a&e "ractical !se of o!r &nowled$e and we were interest in $ettin$ "ractical &nowled$e which was not "ossi le witho!t $!idance
This a
o'e "oint and the idea $i'en y o!r $!ide, teachers and friends
ACKNO/*E&(EMENT
ACKNO/*E&(EMENT
Ideas, they say often re%ain ideas. 0ery few of the%, if find s!""ort
are t!rned into act!al wor&in$ %odels. And the rest of the% are #!st for$otten and re%ain what they started off as ideas.
Home Security System are 'ery deli$hted to ta&e the o""ort!nity to ac&nowled$e whole-heartedly the inn!%era le $!idance 1 s!""ort e)tended to !s y o!r $!ide.
Ins"ite
of
sched!le, we ne'er fo!nd any of o!r re2!ests of hel" and $!idance to hi% ein$ t!rned down. Nor did he show e'en the sli$htest it of i%"atience a o!t !s "esterin$ hi% so %!ch and so often.
3ast
"ro#ect.
their har%onio!s s!""ort for ens!rin$ the s%ooth "assa$e of this a% itio!s
'
1$
Thin& of an o #ect as thin$ or a no!n. E)a%"les of o #ects are for%s and controls. -or%s are windows and dialo$!e co%%and !ttons and list o)es etc.
Properties
controls are the ele%ents yo! "lace inside a for%, s!ch as te)t
.ro"erties tell so%ethin$ a o!t an o #ect, s!ch as na%e, color, si@e, location or how it will eha'e. =o! can thin& of "ro"erties as ad#ecti'e that descri e o #ect. *hen ! refer to a "ro"erty yo! first na%e the o #ect, add a "eriod and then na%e the "ro"erty i.e. refer to the >4a"tion? "ro"erty of for% called A-or% 1( as -or% 1.4a"tion.
Methods
Actions associated with o #ects are called Methods. Methods are the 'er s of o #ect oriented "ro$ra%%in$. /o%e ty"ical %ethods are %o'e, "rint, resi@e and clear. =o! refer to %ethods as o #ect %ethod. -or e)a%"le a "rint %ethod can a""ly to a different o #ect. .rinter. "rint sends the o!t"!t to "rinter o #ect< -or% 1..rint sends o!t"!t to for% called -or% 1. It(s no secret that 0is!al asic is the fa'orite "ro$ra%%in$ en'iron%ent of %any "ro$ra%%er .*hen 0is!al Basic first a""eared, it created a re'ol!tion in *indows .ro$ra%%in$, and that re'ol!tion contin!es to this day. Ne'er efore had *indows "ro$ra%%in$ een so easy, #!st !ild the "ro$ra% yo! want in front of yo!r eyes, and then r!n it .0is!al asic
11
introd!ced !nheard of ease to windows "ro$ra%%in$ and chan$ed "ro$ra%%in$ fro% a chore to so%ethin$ 'ery f!n . In ti%e ,0is!al Basic has $otten %ore co%"le),as well as "owerf!l. 0ERSIONS O) 0ISUA* BASIC *AN(UA(E Microsoft 0is!al Basic B for windows co%es in C editions: 1st D learnin$ edition 2nd D .rofessional edition Crd D Enter"rise edition +which we are !sin$, anyone "lannin$ to do "rofessional a""lication de'elo"%ent that incl!des the ad'ance feat!res of data ase %ana$e%ent sho!ld !se the "rofessional edition or enter"rise edition.
#earnin$ Edition
different ty"es of "ro$ra% !t lac&s a n!% er of tools that the other editions
This edition is desi$ned for "rofessionals. This edition contains all the learnin$ editions contents and %ore, s!ch as the ca"a ility to write AActi'eE( controls and doc!%ents.
The Enterprise Edition
towards "rofessional "ro$ra%%ers who %ay wor& in a tea% and incl!des additional tools s!ch as 'is!al /o!rce/afe, a 'ersion-control syste% that coordinates tea% "ro$ra%%in$.
12
/RITIN( 0ISUA* BASIC "ROJECTS *hen yo! write a 'is!al asic "ro#ect, yo! follow a C ste" "rocess for "lannin$ the "ro#ect and then re"eat the "rocess for creatin$ the "ro#ect. The C ste"s in'ol'es settin$ !" the !ser interface, definin$ the "ro"erties and then creatin$ the code.
1.
;esi$n the !ser interface. *hen yo! "lan the !ser interface ! draw
a s&etch of the screens the !ser will see when r!nnin$ the "ro#ect. 5n yo!r s&etch show the for%s and all controls that yo! "lan to !se. Indicate the na%es that yo! "lan to $i'e the for% and each of the o #ects of the for%. Before yo! "roceed with any%ore ste", cons!lt with yo!r !ser %a&e s!re that yo! oth a$ree on the loo& and feel of the "ro#ect. 2. .lan the "ro"erties. -or each o #ect write down the "ro"erties that and
! "lan to set or chan$e d!rin$ the desi$n of the for%. C. .lan the asic code. This ste" is where yo! "lan the "roced!res that
will e)ec!te when yo!r "ro#ect r!ns. =o! will deter%ine which e'ent re2!ire action to e ta&en and then %a&e a ste" y ste" "lans for those action. 3ater when yo! act!ally write the 'is!al asic code, yo! %!st follow the lan$!a$e synta), r!les and re$!lations. B!t d!rin$ the "lannin$ sta$e yo! will write o!t the actions !sin$ "se!docode, which is an En$lish e)"ression or co%%ent that descri es the action. -or e)a%"le yo! %!st "lan for the e'ent that occ!rs when the !ser clic&s on e)it co%%and "se!docode for the e'ent co!ld e ter%inate the "ro#ect. !tton. The
1%
After yo! ha'e co%"leted the "lannin$ ste"s and ha'e a$ree%ent on yo!r !ser yo! are ready to e$in the act!al constr!ction of the "ro#ect. =o! will !se the sa%e C ste"s "rocess that yo! !sed for "lannin$. 1. ;efine the !ser interface. *hen yo! define the !ser interface yo! can create the for%s and controls that yo! desi$ned in the "lannin$ sta$e. 2. /et the "ro"erties. *hen yo! set the "ro"erties of the o #ects yo! $i'e each o #ect a na%e and define s!ch attri !tes as the contents of a la el, the si@e of te)t and the words that a""ear on the to" of a co%%and !tton and in the for%(s title ar. C. *rite the asic code. =o! will !se asic "ro$ra%%in$ state%ents to carry o!t the actions needed y yo!r "ro$ra%. =o! will e s!r"rised and "leased "ro$ra%. 0ISUA* BASIC "ROJECTS Each 0is!al Basic .ro#ect consists of at least 2 or !s!ally %ore files. 1. The dot 0B. -ile called the .ro#ect -ile, is a s%all te)t file that hold the na%es of the other files in the "ro#ect as well as so%e infor%ation a o!t the 0B e+:iro+me+t. 2. Each for% in yo!r "ro#ect is sa'ed in a file with dot fr% e)tension. To e$in yo!r "ro#ects will ha'e only one for%. 3ater yo! can e)"ect yo!r "ro#ects to ha'e se'eral for%s with one dot fr% file for each for%. y how few state%ents yo! need to create a "owerf!l windows
12
A for% file holds a descri"tion of all o #ects and their "ro"erties for the for%, as well as the asic code yo! ha'e written to res"ond to the e'ents. In 'is!al asic each of these for% files is referred to as >-or% Mod!le?. C. 5"tionally yo!r "ro#ect can ha'e ;5T BA/ e)tension files. These files hold asic state%ent that can e accessed fro% any for%. As soon as yo! e$in writin$ %!ltifor% "ro#ects yo! will need ;5T BA/ files. ;5T BA/ files are called A/TAN;AR; 45;E M5;83E/? F. Additional controls called A4!sto% 4ontrols( are stored in files with a ;5T 54E e)tension. If yo! incl!de controls in yo!r "ro#ect that are not "art of the standard control set, the ;5T 54E file na%es will e incl!ded in the "ro#ect. G. After yo! sa'e the "ro#ect 'is!al asic a!to%atically adds one %ore file to yo!r "ro#ect with e)tension of ;5T 0B*. This file holds infor%ation a o!t each of yo!r "ro#ect(s for%s. 0ISUA* BASIC EN0IRONMENT The 0is!al Basic I;E a""ears as shown in fi$!re elow: and as a 0is!al Basic .ro$ra%%er this is where yo! will s"end %ost of yo!r "ro$ra%%in$ ti%e. If yo! are not already fa%iliar with the "arts of the I;E, the f!rther e)"lanation will %a&e yo! to it.
1#
The 0is!al Basic I;E has C distinct states: &esi.+; Ru+ -+5 &e6u.. The c!rrent state a""ears in the 0is!al Basic(s title ar. The I;E is co%"osed of these "arts: The Men!Bar The ToolBar The "ro#ect e)"lorer The "ro"erties window The for% layo!t window The tool o) The for% desi$ners
4ode windows
The Men! ar re"resent the 'is!al asic %en!s. Here is a list of those %en!s and what they do o )i<e D file handlin$ and "rintin$< also !sed to %a&e EEE files o E5it D standard editin$ f!nctions, !ndo, searches. o 0ie7 D dis"lays or hides windows and tool ars. o "ro=ect D sets "ro#ect "ro"erties, add6re%o'es for%s and %od!les and add6re%o'es references and co%"onents. o )orm-t D ali$ns or si@es control. o &e6u. - - starts6sto"s de !$$in$ and ste""in$ thro!$h "ro$ra%s. o Ru+ D starts a "ro$ra% or co%"iles and starts it. o Too<s D add "roced!res, start the %en! editor, set I;E o"tions. o A55 D IN/ D add in %ana$er,lists add D ins li&e a""lication wi@ard and A.I 'iewer. o /i+5o7 D arran$es or selects o"en window. o He<, D handles hel" and the a o!t o). THE TOO*BAR
13
The %ain 0is!al Basic Tool ar a""ears as shown in fi$!re. This tool ar contains !ttons %atchin$ "o"!lar %en! ite%s, as yo! can see in the fi$!re. 4lic&in$ the !tton is the sa%e as selectin$ a %en! ite% and can sa'e yo!r ti%e. Besides the %ain tool ar yo! can also dis"lay other doc& a le tool ar in 'is!al asic: the de !$,edit and for% editor tool ars. To dis"lay one of these tool ars #!st select !sin$ the tool ars ite% in the 'iew %en!.The tool ar a""ears free floatin$ at first !t yo! can doc& it as yo! li&e in the I;E.
Pro"ect E%plorer
The "ro#ect e)"lorer a""ears as shown in fi$!re. This is the window that allows yo! to coordinate the "arts of yo!r "ro$ra% into folders for easy %ani"!lation, eca!se all the "arts of the "ro#ect in the "ro#ect e)"lorer arran$ed in a tree 'iew. The "ro#ect E)"lorer can e 'ery !sef!l when yo! are wor&in$ in a lar$er "ro#ect and the I;E is filled with desi$n and code windows. To "ic& o!t the "arts of the "ro#ect yo! want to wor& on, yo! only ha'e to find it in the "ro#ect e)"lorer and do! le clic& it. ;oin$ so rin$s the a""ro"riate window
1'
to the fore $ro!nd and if yo! ha'e clic&ed a for%, o"ens that for% in the "ro"erties window. =o! can also add and re%o'e ite%s y ri$ht clic&in$ the% with the %o!se in the .ro#ect E)"lorer. i.e. yo! can add new for%s, M;I for%s, %od!les, class %od!les and so on #!st y ri$ht clic&in$ the "ro#ect(s icon in the "ro#ect e)"lorer. =o! can re%o'e for%s y ri$ht clic&in$ the% and selectin$ the re%o'e ite% in the "o" !" %en! that a""ears or yo! sa'e the% to disc or switch the% etween the for%(s code window and the for% itself. The !ttons at the to" of the "ro#ect e)"lorer allows yo! to switch
etween 'iews. The left !tton dis"lays an o #ect(s code window, the %iddle !tton dis"lays the o #ect itself, the ri$ht !tton to$$les the folders o"en and closed in the "ro#ect e)"lorer as in the standard tree 'iew. To s!% !", then, the "ro#ect e)"lorer $i'es !s a 'al!a le o'er'iew of o!r entire "ro#ect, which is really !sef!l when "ro#ect $ets lar$e and contains %any co%"onents.
Properties &indo'
The "ro"erties window a""ear as shown in fi$!re. This is where yo! set an o #ect(s "ro"erty: i.e. yo! can set the ca"tion of co%%and !ttons, the te)t in the te)t o)es, and literally h!ndreds of other "ro"erties here.
11
*hen yo! select o #ect li&e a control in 'is!al asic !sin$ the %o!se the o #ect "ro"erties a""ear in the "ro"erties window. To chan$e or e)a%ine a "ro"erty settin$ in the "ro"erty window, yo! #!st find that "ro"erty(s ite% in that window. If yo! want to chan$e that "ro"erty nothin$ co!ld e easier D #!st clic&in$ the c!rrent settin$. -or "ro"erties that yo! set yo!rself, the c!rrent "ro"erty 'al!e is hi$hli$hted and as yo! #!st ty"e in the new settin$s. If the "ro"erties can only e set to one of a s"ecific ran$e of "ro"erties, a downwards arrow will a""ear in the "ro"erty settin$ o): clic& this !tton to see the "ossi le 'al!es this "ro"erty can ha'e. *e sho!ld note that there are really two &inds of "ro"erties in 0is!al Basic: ;esi$n-ti%e and r!nti%e "ro"erties +for e)a%"le, a *e rowser control %i$ht ha'e a r!nti%e "ro"erty to hold its c!rrent 8R3, eca!se it
2$
doesn(t %a&e sense to set that "ro"erty at desi$n ti%e,. The "ro"erties that in the .ro"erties window are desi$n-ti%e "ro"erties. +Microsoft does ha'e other !tilities, s!ch as the Acti'eE 4ontrol Test 4ontainer to allow yo! to wor& with r!nti%e "ro"erties interacti'ely., In the a sence of ade2!ate doc!%entation, it can so%eti%es e diffic!lt to deter%ine what "ro"erties a s"ecific Acti'eE 4ontrol has. To find o!t, it(s easy to create a control of that ty"e and o"en it in the .ro"erties window, where the "ro"erties will e listed. +This a""lies only to "ro"erties a'aila le at desi$n ti%e, of co!rse., That(s a 2!ic& and dirty way to $et an o #ect(s "ro"erties< fro% the tool ar or the 'iew ne y,. The 5 #ect Browser "ro'ides yo! with an o'er'iew of all the o #ects in a "ro#ect, incl!din$ their "ro"erties and %ethods and what "ara%eters to "ass. -or e)a%"le, we ta&e a loo& at rich te)t o)es in the 5 #ect Brower in -i$!re THE )ORM *AYOUT /IN&O/ The -or% 3ayo!t window a""ears in -i$!re. 8sin$ this whindow, yo! can "ositions for%s as yo! the% to a""ear on the screen whe they are first dis"layed.
21
To $i'e a for% a new initial location, #!st dra$ that for% in the -or% 3ayo!t window to that new location. =o!(ll see the new screen "osition of the for%(s !""er-left corner +in twi"s, dis"layed in the tool ar +that "osition is the fir set of n!% ers in the tool ar< see -i$!re,. To RE/IHE the for%, on the other hand, yo! ha'e to !se a for% desi$ner, which we(ll see in a %in!te. TOO*BO> The 0is!al Basic tool o) a""ears in -i$!re 2.I. This window is a %ainstay of 0is!al Basic and indicates what was so re'ol!tionary a o!t 0is!al Basic in the first "lace. =o! !se the tool o) $oto add controls to yo!r "ro#ect, and yo! do so in a 'ery easy way D #!st clic& a tool, s!ch as 4o%%and B!tton tool, and draw the new !tton in a for%. That(s all it ta&es. The tool o) is loaded with controls yo! can add to yo!r for%s D te)t o)es, la els, list o)es, i%a$e controls, chec& o)es, ti%ers, and %!ch %ore. *hen yo! add a new Acti'eE control to yo!r "ro#ect +!sin$ the .ro#ect %en!(s 4o%"onents ite%,, that control a""ears in the tool o), and yo!(re ready to add it to yo!r for% . All in all, the tool o) is a "ri%e e)a%"le of what(s ri$ht a o!t 0is!al Basic. )ORMS &ESI(NERS AN& CON&E /IN&O/S The last "arts of I;E that we(ll ta&e a loo& at in o!r o'er'iew are for% desi$ners and code windows, which a""ear in the center of -i$!re 2.J.+The for% desi$ner dis"lays the c!rrent for% !nder desi$n, co%"lete with
22
co%%and
!tton, and the code window dis"lays the code for the
4o%%and1K4lic&+, "roced!re., -or% desi$ners are really #!st windows in which a "artic!lar for% a""ears. =o! can "lace controls into a for% si%"ly y drawin$ the% after clic&in$ the corres"ondin$ control(s too in the tool o) .
&ork Space
4ode windows are si%ilarly easy to !nderstand: yo! #!st "lace the code yo! want to attach to an o #ect in the code window +to o"en an o #ect(s code in the code window, #!st do! le-clic& that o #ect,. There are two dro"-down list o)es at the to" of the code window: the left list lets yo! select the o #ect to add code to, and the ri$ht list lets yo! select the "roced!re to all +all the %ethods the o #ect s!""orts a""ear in this list,. COMMON 0ISUA* BASIC CONTRO*S 1. Te%t!o% ? This control dis"lays te)t that the !ser can edit. It is a %ini te)t editor. 2. #a!el ? This control dis"lays te)t on a -or% that the !ser can(t edit. %. (heck)o% ? The chec& o) "resents one or %ore choices that the !ser canselect. It contains a 'al!e of 0 if it is not chec&ed and 1 if it is chec&ed. 2. Option )utton ? 5"tion !ttons or Radio !ttons a""ear in $ro!"s, and the !ser can choose only one of the%. #. #ist)o% ? This control contains a list of o"tions fro% which the !ser can choose one or %ore. The !ser can scroll thro!$h the list to locate an ite%.
2%
. (om!o)o% ? It is si%ilar to the 3istBo) control, !t it contains a te)t edit field. The !ser can either choose an ite% fro% the list or enter a new strin$ in the edit field. 3. Picture)o% ? This control is !sed to dis"lay i%a$es. '. *ma$e ? It is si%ilar to .ict!reBo) control in that it can dis"lay i%a$es, !t it s!""orts only a few feat!res of the .ict!reBo) control and re2!ires fewer reso!rces. 1. Shape ? The /ha"e control is !sed to draw $ra"hical ele%ents, s!ch as o)es and circles, on the s!rface of a for%. 1$. #ine ? /i%ilar to /ha"e control, the 3ine control is !sed to draw lines on a -or%. 11. +rame ? It is !sed to draw o)es on the -or% and to $ro!" other ele%ents. 12. +ile System controls? These controls add file-handlin$ ca"a ilities to the a""lication The -ile /yste% controls are : ;ri'e3istBo), ;ir3istBo) and -ile3istBo). 1%. Timer? It can e !sed to "erfor% tas&s at re$!lar inter'als. 12. O#E ?The 53E container control is a window yo! can "lace on yo!r container -or% to host doc!%ents fro% other a""lications s!ch as Microsoft *ord and Microsoft E)cel. Department Of Electronics and Telecommunication 22
1#. Data (ontrol ? This control "ro'ides "oint and clic& access to data stored in data ases "RO"ERTIES; METHO&S AN& E0ENTS O) CONTRO*S In 0B, e'ery o #ect has "ro"erties and %ethods. Most control "ro"erties are set when the o #ect is created, !t yo! can chan$e a "ro"erty later y assi$nin$ a new 'al!e to it. A "ro"erty can e chan$ed at desi$n ti%e thro!$h the .ro"erties *indow or at r!n ti%e thro!$h the code. 0B assi$ns defa!lt "ro"erties to e'ery new control yo! "lace on a -or%. The defa!lt Na%e "ro"erty, for e)a%"le, is the na%e of the control, followed y n!% er +4o%%and1, 4o%%and2 and so on,. A few "ro"erties are a'aila le only at desi$n ti%e, and so%e other are a'aila le only at r!n ti%e. -or e)a%"le the M!lti3ine "ro"erty of the Te)tBo) control can e set only at desi$n ti%e )e7 Commo+ "ro,erties The followin$ "ro"erties a""ly to %ost o #ects:
,ame
This "ro"erty sets the na%e of the control, thro!$h which yo! can access the control(s "ro"erties and %ethods.
-ppearance
This "ro"erty sets the ac&$ro!nd color on which te)t is dis"layed or $ra"hics are drawn.
+ore(olor
2#
+ont
This "ro"erty sets the face, attri !te, and si@e of the font !sed for the te)t on the control.
(aption
This "ro"erty sets the te)t that is dis"layed on %any controls that don(t acce"t in"!t, for e)a%"le, the te)t on a 3a el control, the ca"tion of a 4o%%and Bytton control, and the strin$s dis"layed ne)t to the 4hec&Bo) and 5"tionB!tton controls.
Te%t
This "ro"erty sets the te)t that is dis"layed on the controls which acce"ts !ser in"!t, for e)a%"le, the Te)tBo) control.
&idth. Hei$ht
These "ro"erties set the control(s di%ensions. The defa!lt !nits are twi"s, and there are 1FF0 twi"s in an inch.
#eft. Top
These "ro"erties set the co-ordinates of the control(s !""er left corner, e)"ressed in the !nit of the container +!s!ally a -or%,.
Ena!led
By defa!lt, this "ro"erties 'al!e is Tr!e, which %eans that the control $ets the foc!s. /et it to -alse to disa le the control. A disa led control a""ears $rey and can(t acce"t !ser in"!t.
/isi!le
/et this "ro"erty to -alse to %a&e a control in'isi le. /o%eti%es yo! !se in'isi le controls to store infor%ation that is !sed internally a""lication and sho!ld not e seen or %ani"!lated y the !ser.
"RO"ERTIES O) AN OBJECT CAN BE SET IN THE "RO"ERTIES /IN&O/. Methods
y the
5 #ects ha'e %ethods, which are actions they can carry o!t. The -or% o #ect, for e)a%"le, &nows how to clear itself, and yo! can in'o&e the 4ls %ethod to clear a -or%. A -or% also &nows how to hide itself, an action that yo! can in'o&e fro% within yo!r code with the Hide %ethod. The AddIte% and Re%o'eIte% are %ethods !sed to %ani"!late the ite%s in a 3istBo) or 4o% oBo) control.
E0ents
E'ents deter%ine the control(s reaction to e)ternal conditions. E'ents are reco$ni@ed y the 'ario!s controls, !t are handled y the a""lication. A 4o%%and B!tton will reco$ni@e that it was clic&ed !"on, !t it won(t react to the e'ent !nless yo! "ro'ide so%e code i.e. we %!st tell 0is!al Basic what to do when the !ser clic&s on the s"ecific co%%and !tton. 5nce yo! define a s! ro!tine for the controls clic& e'ent, this s! ro!tine e)ec!tes each ti%e the control is clic&ed. The s! ro!tine that deter%ines how a control reacts to an e'ent is called an e'ent handler. To 7rite -+ e:e+t 8-+5<er @or - co+tro<; @o<<o7 t8ese ste,s 1. /witch to the code window or do! le-clic& on the control for which yo! want to write the e'ent handler.
23
2. In the to" of the code window yo! will see two dro" down lists. The first list contains the na%es of all the controls on the for%. /elect the control for which yo! want to write an e'ent handler. The second list contains alt the e'ents the selected control can reco$ni@e. /elect the e'ent for which yo! want to write an e'ent handler. The co% ination of the control(s na%e and the e'ent(s na%e is !ni2!e and is the na%e of the e'ent handler. The two %ost co%%on $ro!"s of e'ents are %o!se and &ey oard e'ents. Mouse E:e+ts The e'ents tri$$ered y %o!se actions are the %ost co%%on e'ents in "ro$ra%%in$ with 0is!al Basic. Most of the ele%ents of the !ser interface can e %ani"!lated with the %o!se. The co%%on %o!se e'ents are:
(lick. D!l(lick
The 4lic& e'ent ta&es "lace when the !ser clic&s the left %o!se !tton< the ; l4lic& e'ent ta&es "lace when the !ser do! le-clic&s the left %o!se !tton.
MouseDo'n. Mouse1p
The Mo!se;own e'ent ta&es "lace when the %o!se !tton is "ressed, and the Mo!se8" e'ent ta&es "lace as it is released.
MouseMo0e
The e'ent ta&es "lace contin!o!sly as the %o!se is %o'ed o'er a control. The definitions of 4lic& and ; l4lic& e'ents are: Su6 Co+tro<N-meAC<ic9( ! ........ E+5 Su6 Department Of Electronics and Telecommunication 2'
Su6 Co+tro<N-meA&6<C<ic9( ! ........ E+5 Su6 The definition of Mo!se8" e'ent is: "ri:-te Su6 Co+tro<+-meAMouseT=,(Butto+ -s I+te.er; S8i@t As I+te.er; > As Si+.<e; Y As Si+.<e! ....................... ...... ... E+5 Su6 The B!tton ar$!%ent re"orts, which %o!se !tton ca!sed the e'ent. The /hift ar$!%ent re"orts the stat!s of the /hift, 4ontrol, and Alt &eys< and the E and = ar$!%ents are the co-ordinates of the "oint where the %o!se !tton was released. The 'al!es of the !tton ar$!%ents are Co+st-+t 0 3eftB!tton 0 Ri$htB!tton 0 MiddleB!tton 0-<ue 1 2 F &escri,tio+ 3eft !tton is "ressed Ri$ht !tton is "ressed Middle !tton is "ressed
21
ABOUT "ROJECT
%$
ABOUT "ROJECT
Tit<e o@ t8e ,ro=ect Co<<e.e : ? Home Security System
/./.9..olytechnic-A% ernath
Pro"ect Documentation
Pro"ect Description
Our Project :: Security is the most important feature which is needed now a days. ow a days
more and more comple!es" malls" multi story #uildin$ ha%e there centrali&ed security system. 'n order to represent the same we students of third year ha%e made a approach to ha%e a security system for a home which is a demo model or prototype. 'n this home security followin$ security features are added" (. )ire *temperature+* sensor used is LD,- Li$ht Dependent resistor+ .. /ater 0. Li$ht 1. Smo2e *sensor used is LD,- Li$ht Dependent resistor+ * sensor used is LD,- Li$ht Dependent resistor+ *sensor used is LD,- Li$ht Dependent resistor +
The *nteraction 2 *nterdependency pro"ect module 33 'n our project" each and e%ery sensin$ circuit is dependent actions are ta2en. on the
)ack$round information our pro"ect 3 5'er all the %ain act "erfor%ed y the ho%e sec!rity syste% +i.e. o!r "ro#ect, is of controllin$ the 'ario!s followin$ acts de"endin$ on the conditions:
Co+5itio+ ? /-ter Actio+? 1.B!@@er 5n 2.Indication 5N 4ontroller syste% C.Indicator on 3E; .anel
%1
Co+5itio+ ? Tem,er-ture B)ire Actio+? 1.B!@@er 5n 2.Indication 5N 4ontroller syste% C.Indicator on 3E; .anel F./M/ on the fi'e ;ifferent 4ell "hone Co+5itio+ ? *i.8t Actio+? 1.B!@@er 5n 2.Indication 5N 4ontroller syste% C.Indicator on 3E; .anel F./M/ on the fi'e ;ifferent 4ell "hone Co+5itio+ ? Smo9e Actio+? 1.B!@@er 5n 2.Indication 5N 4ontroller syste% C.Indicator on 3E; .anel F./M/ on the fi'e ;ifferent 4ell "hone Pro"ect Desi$n
Our decision 33 5!r "ro#ect is de'elo"ed with the hel" of o!r honora le $!ide The other staff mem#ers of electronic and computer department also encoura$ed us with the idea of this project.
The modules of the pro"ect are 33 All modules are interfaced with the parallel port of the P3 I+,ut Mo5u<es Mo5u<e 1 ?C Te%"erat!re 6/%o&e /ense on .in 11 of 3.T "ort Mo5u<e 2 ?C 3i$ht /ensin$ circ!it connected to "in 10 of 3.T "ort Mo5u<e % ?C water /ensin$ circ!it connected to "in 12 of 3.T "ort Mo5u<e 2 ?C /%o&e /ensin$ circ!it is connected to "in 1C of 3.T "ort Out,ut Mo5u<e
%2
Home Security System Mo5u<e 1 ?C /iren connected to "in 2 Mo5u<e 2 ?- 3E;1-F Indicator .anel for 0is!al Indication
The or$ani4ation of our pro"ect 33 The "ro#ect is or$ani@ed %ainly in fo!r %od!les i.e. te%"erat!re6-ire, water, li$ht, and /%o&e
Pro"ect *mplementation
The implementation of our pro"ect 33 -irst and fore%ost action in the i%"le%entation of o!r "ro#ect was the hardware connections and co%" a ilities.
Ho' do you tell if your pro"ect 'orked correctly 2 'ithout !u$s5 Actions %ay not rin$ s!ccess always< B!t witho!t actions there is no way to s!ccess. Nothin$ is "erfect in the world so as is o!r "ro#ect it is wor&in$ !t there %ay
co%e so%e error in co!rse of the o"eration. /ince all the software ro!tines are desi$ned y !s. 1ser6s manuals 2 instructions 7 ho' 'ould someone install or operate our pro"ect5
1. 4onnect the Ho%e /ec!rity "ort thro!$h the "arallel "ort to the .4. 2. 4onnect the Ho%e /ec!rity interfacin$ circ!itry to "arallel "ort and the
Ho%e /ec!rity.
C. T!rn on the "ower s!""ly to the syste% after confir%in$ the connections.
Soft'are installation 38 1. Install the software in the harddis& in Ho%e/ec!rity folder . 2. -ro% that r!n Ho%e/ec!rity file which will dis"lay $ra"hical !ser interface on the screen.
Operation 38
%%
Home Security System The o"eration of o!r "ro#ect is to control the followin$ in the Ho%e with the hel" of the .4(s "arallel "ort. The co%"onents controlled are (.3onstantly Scans the 'nput port after e%ery 455ms and dependin$ on the sensor acti%ated followin$ actions are ta2en. ..6isual indication for the respecti%e sensor are $i%en on the LED panel" One LED*(5mm+ is used for one 'ndication. 0.Bu&&er will rin$ for any one or more then one sensor acti%ated. 1.7essa$e will #e send to all the num#ers which are entered in system software. 4.'ndication central P3 will $i%en in terms of chan$e in color. Soft'are 1sa$e 7 -ny commercial soft'are used should !e noted 2 credited . /oftware !sed in 5!r "ro#ect is Microsoft 0is!al Basic Than&s to o!r colle$e which has $i'en "er%ission for the !sa$e of software 1 the $!idance
%2
A+5 Circuit
Se+sor
%#
action will
Rc Vcc
e ta&en for
2K2 100K T1
470K T1
200
Vcc
Vcc Rc
2K2 100K T1
Rc
T1
470K
-i$ /hows the li$ht sensin$ circ!it to sense the 'ehicle which are "assin$ thro!$h the t!nnel. In the -i$. sensor !sed is 3;R ie 3i$ht ;e"endent Resistor and transistor si !sed as switch. O,er-tio+ ? C-se 1. *hen the li$ht is fallin$ on the 3;R it offer low resistance called as ill!%ination resistance, when the resistance is low , hi$h c!rrent flows thro!$h the circ!it and 'olta$e is de'elo"ed across FI0Loh% resistance , d!e to which transistor T1 is on , 'olta$e across collector of T1 is a o!t 0.20 which is 3ow , this 'olta$e is fed to transistor T2 Now ase e%itter 'olta$e of T2 is low ie 0 e M 0.I 0 , hence transistor T2 is 5ff and its o!t"!t is raised to 044. Hence when no 0ehicles , data a'aila le to "ort is 3o$ic 1. C-se 2. *hen the li$ht is fallin$ on the 3;R is o str!cted y %o'in$ 'ehicle , it offer Hi$h resistance called as ;ar& resistance, when the resistance is Hi$h , low c!rrent flows thro!$h the circ!it and 'olta$e is de'elo"ed across FI0Loh% resistance , is not s!fficient to t!rn on T1 , 'olta$e across collector of T1 is a o!t 0cc which is Hi$h , this 'olta$e is fed to transistor T2 Now ase e%itter 'olta$e of T2 is Hi$h ie 0 e N 0.I 0 , hence transistor T2 is 5n and its o!t"!t is .!lled to 0.20. Hence when 0ehicles is %o'in$, data a'aila le to "ort is 3o$ic 0.
%3
"o7er Su,,<y
%'
"O/ER SU""*Y
"o7er Su,,<y ? @i. s8o7 t8e circuit 5i-.r-m o@ t8e ,o7er su,,<y It co+sist o@ 1. Tr-+s@ormer ? for /te""in$ down the 2C0' Ac 'olta$e to 1J +O-0-O,0 Ac 2. Bri5.e recti@ier ? To con'ert ste" down A4 'olta$e to "!lsatin$ ;4 of a o!t 1B0. C. C-,-citor )i<ter ? To filter the ri""le "resent in "!lsatin$ ;4 and Pi'e the "!re ;4 at the o!t"!t. F. Re.u-<tor IC 3'DD ? The o!t"!t of the filter is connected to re$!altor I4 IJ0G and IJ12 which will $i'e 7G' and 7120 ;4 o!t"!t. This I4s are fi)ed 'olta$e re$!lator.
D3
D2
C1
C2
5V DC
7812
C3
C4
12V DC
%1
*ater /ensin$
/%o&e /ensin$
3i$ht /ensin$
P/M M5;EM
2$
"-r-<<e< "ort
21
"ARA**E* "ORT
"-r-<<e< ,ort ?*"T Many years a$o, IBM desi$ned the "arallel "ort to dri'e "rinters. A standard Q;Q 2G "in %ale connector was a'aila le on the ac& of the .4 that connected to a "rinter. Their sole "!r"ose was to interface with the de facto 4entronics "rinter. Instead of !ildin$ a clean direct interface that relied on software to in'ert si$nals, they !sed hardware in'erters in a %ost !n!s!al fashion. Here an in'erter, there an in'erter, e'erywhere an in'erter. B!t itQs the standard, e'ery ody has one so lets !se it. ;5/ s!""orts !" to three "arallel "orts that are assi$ned the handles of 3.T1, 3.T2, and 3.TC. Each "ort re2!ires three consec!ti'e I5 addresses to select all the "ossi ilities. They will e referred to as Base, Base 71, and Base 7 2. .arallel "ort is a %isno%er. Act!ally there are fi'e "orts, consistin$ of two o!t"!t "orts and three in"!t "orts. At ase address, ei$ht its are a'aila le as o!t"!t on "ins 2-O. They are hard wired to an ei$ht it in"!t at the sa%e address. The o!t"!t is latched in the !s!al %anner with the I5 write "!lse and is always acti'e. The newer "orts co% ine the IBM circ!itry into a sin$le chi" and chan$e the series resistor to a "!ll-!". TheyQre f!nctional e2!al. 8se this ase address as a strai$ht forward ei$ht it o!t"!t only. At ase 7 1, there are fi'e in"!t its fro% ;C to ;I. They are $ated on the !s with I5 read. Note that it ;I +"in 11, is in'erted. /oftware can in'ert this it if necessary and will e de%onstrated later. Bit ;B +"in 10, can also e !sed to $enerate a hardware interr!"t. /e'eral conditions %!st e %et efore an interr!"t occ!rs. This "in can e !sed as a data in"!t witho!t concerns of inad'ertently ca!sin$ an interr!"t. If a hardware interr!"t is desired, this is the "in to !se. At ase 7 2 se'eral o"tions e)ist. This is a fo!r it o!t"!t or a fo!r it in"!t, or can e confi$!red as any %i)t!re of in"!t and o!t"!t. This is "ossi le eca!se the o!t"!t is o"en collector. By sendin$ data to this "ort to %a&e an o!t"!t "in hi$h, allows that "in to e dri'en as an in"!t. The o"en collectors are "!lled hi$h with F.I L resistors. 5"en collectors are not dri'en hi$h !t float hi$h d!e to the "!ll !" resistor char$in$ any ca"acitance in the circ!it. The s"eed on this "ort will not e as fast as on the ase address
22
Home Security System "artic!larly it ;0 that has an added e)ternal ca"acitor. Test any a""lication that re2!ires %a)i%!% o!t"!t s"eed fro% this "ort.
"C "-r-<<e< "ort Test Circuit Interr!"ts are nor%ally o"en collector acti'ated with a de'ice "!llin$ the line low. Any card in the I/A slot can "!ll an interr!"t line low. This "arallel "ort card !ses a different a""roach. Bit ;F at ase 7 2 controls a tri-state de'ice. *hen ;F is hi$h, "inQs 10 lo$ic state is "assed to the hardware interr!"t n!% er I +defa!lt, or n!% er G. Re%e% er that all o!t"!ts are latched and re%ain acti'e. If it ;F is set hi$h, and in"!t "in 10 is hi$h, this co!ld disa le other cards fro% !sin$ the selected interr!"t. =o!r software "ro$ra% sho!ld set it ;F low when not controllin$ the interr!"t. Test Circuit )or Byte I+BOut The $oal of this circ!it is to !se the %ini%!% n!% er of "arts that will "ro'ide a f!nctional test of all ei$ht its. Each in"!t it can e indi'id!ally controlled, and 'is!ally dis"layed on the ei$ht o!t"!t 3E;s. The dis"lay 3E;s are dri'en with the so!rce c!rrent only fro% the o!t"!t. The "referred %ethod wo!ld e to "ower the 3E;s and !se the sin& c!rrent to li$ht the%. No "ower +0cc, is a'aila le on the "arallel "l!$, so e)ternal "ower wo!ld e re2!ired. It was fo!nd e%"irically that on the ori$inal IBM "ort and se'eral clones, that each card "rod!ced a%"le so!rce c!rrent for clear indication fro% the 3E;s. The circ!it can est e !ilt on a solderless read oard with short #!%"ers +a o!t JR, soldered to a 2G "in %ale Q;Q connector. An e)tension ca le +%ale on one end, fe%ale on the other, will allow the circ!it to e "laced in front of the co%"!ter for easy access. To si%"lify the circ!it wirin$, !se a 10 "osition 3E; ar$ra"h, an ei$ht "osition ;I. switch,
2%
Home Security System and two 10 "in /I. resistors of the 'al!e shown. Installation of these "arts re2!ires only one #!%"er. Indi'id!al 3E;s and resistors also wor& with #!st a little %ore wirin$. The whole "ro#ect sho!ld e easily constr!cted within an ho!r.
22
(SM MO&EM
2#
Readin$, writin$ and deletin$ /M/ %essa$es. /endin$ /M/ %essa$es. Monitorin$ the si$nal stren$th. Monitorin$ the char$in$ stat!s and char$e le'el of the attery. Readin$, writin$ and searchin$ "hone oo& entries.
The n!% er of /M/ %essa$es that can e "rocessed y a P/M %ode% "er %in!te is 'ery low - only a o!t si) to ten /M/ %essa$es "er %in!te. /8-t is - ("RS Mo5emE A P.R/ %ode% is a P/M %ode% that additionally s!""orts the P.R/ technolo$y for data trans%ission. P.R/ stands for Peneral .ac&et Radio /er'ice. It is a "ac&etswitched technolo$y that is an e)tension of P/M. +P/M is a circ!it-switched technolo$y., A &ey ad'anta$e of P.R/ o'er P/M is that P.R/ has a hi$her data trans%ission s"eed.
Home Security System P.R/ can e !sed as the earer of /M/. If /M/ o'er P.R/ is !sed, an /M/ trans%ission s"eed of a o!t C0 /M/ %essa$es "er %in!te %ay e achie'ed. This is %!ch faster than !sin$ the ordinary /M/ o'er P/M, whose /M/ trans%ission s"eed is a o!t B to 10 /M/ %essa$es "er %in!te. A P.R/ %ode% is needed to send and recei'e /M/ o'er P.R/. Note that so%e wireless carriers do not s!""ort the sendin$ and recei'in$ of /M/ o'er P.R/. If yo! need to send or recei'e MM/ %essa$es, a P.R/ %ode% is ty"ically needed. /8ic8 is Better? Mo6i<e "8o+e or (SM B ("RS Mo5emE In $eneral, a P/M6P.R/ %ode% is reco%%ended for !se with a co%"!ter to send and recei'e %essa$es. This is eca!se so%e %o ile "hones ha'e certain li%itations co%"arin$ to P/M6P.R/ %ode%s. /o%e of the li%itations are descri ed elow:
/o%e %o ile "hone %odels +e)a%"le: Ericsson RCJ0, cannot e !sed with a co%"!ter to recei'e concatenated /M/ %essa$es.
/8-t is - co+c-te+-te5 SMS mess-.eE A concatenated /M/ %essa$e is a %essa$e that contains %ore than 1F0 ytes. +A nor%al /M/ %essa$e can only contain at %ost 1F0 ytes., 4oncatenated /M/ wor&s li&e this: the senderQs %o ile de'ice rea&s a %essa$e lon$er than 1F0 ytes into s%aller "arts. Each of these "arts are then fitted in a sin$le /M/ %essa$e and sent to the reci"ient. *hen these /M/ %essa$es reach the destination, the reci"ientQs %o ile de'ice will co% ine the% ac& to one %essa$e. /8-t is t8e c-use o@ t8e ,ro6<emE *hen the %o ile "hone recei'es the /M/ %essa$es that are "arts of a concatenated /M/ %essa$e, it co% ines the% to one %essa$e a!to%atically. The correct eha'ior sho!ld
e: when the %o ile "hone recei'es the /M/ %essa$es that are "arts of a Many %o ile "hone %odels cannot e !sed with a co%"!ter to recei'e MM/ %essa$es. Beca!se when they recei'e a MM/ notification, they handle it a!to%atically instead of forwardin$ it to the co%"!ter.
concatenated /M/ %essa$e, it forwards the% to the co%"!ter witho!t co% inin$ the%.
A %o ile "hone %ay not s!""ort so%e AT co%%ands, co%%and "ara%eters and "ara%eter 'al!es. -or e)a%"le, so%e %o ile "hones do not s!""ort the sendin$
23
Home Security System and recei'in$ of /M/ %essa$es in te)t %ode. /o, the AT co%%and RAT74MP-S1R +it instr!cts the %o ile "hone to !se te)t %ode, will ca!se an error %essa$e to e ret!rned. 8s!ally P/M6P.R/ %ode%s s!""ort a %ore co%"lete set of AT co%%ands than %o ile "hones.
e)a%"le, an /M/ %essa$in$ a""lication that "ro'ides rin$tone downloadin$ ser'ice sho!ld e r!nnin$ all the ti%e so that a !ser can download rin$tones any ti%e he6she wants., If s!ch /M/ %essa$in$ a""lications !se %o ile "hones to send and recei'e /M/ %essa$es, the %o ile "hones ha'e to e switched on all the ti%e. Howe'er, so%e %o ile "hone %odels cannot o"erate with the attery re%o'ed e'en when an A4 ada"tor is connected, which %eans the attery will e char$ed 2F ho!rs a day. Besides the a o'e iss!es, %o ile "hones and P/M6P.R/ %ode%s are %ore or less the sa%e for sendin$ and recei'in$ /M/ %essa$es fro% a co%"!ter. Act!ally, yo! can consider an AT-co%%and-ena led %o ile "hone as RP/M6P.R/ %ode% 7 &ey"ad 7 dis"lay 7 ...R. There is not %!ch difference etween %o ile "hones and P/M6P.R/ %ode%s in ter%s of /M/ trans%ission rate, since the deter%inin$ factor for the /M/ trans%ission rate is the wireless networ&. Usi+. AT comm-+5s to Se+5 -+5 Recei:e SMS
This AT co%%and t!torial is written to s!""ort o!r Teltoni&a T-Mode%8/B, a 8/B2.0 P/M %ode% ased on the No&ia 12i P/M %od!le - fast E;PE technolo$y is s!""orted. /o%e of the %ost "o"!lar a""lications are /M/ ased tele%etry, sec!rity and news roadcastin$. /te"s !sin$ AT co%%ands to send and recei'e /M/ !sin$ a P/M %ode% fro% a co%"!ter 1. /ettin$ !" P/M %ode% 2. 8sin$ the Hy"erTer%inal C. Initial set!" AT co%%ands F. /endin$ /M/ !sin$ !sin$ AT co%%ands G. Recei'in$ /M/ !sin$ !sin$ AT co%%ands
2'
Home Security System B. 8sin$ a co%"!ter "ro$ra% to send and recei'e /M/ After s!ccesf!lly sendin$ and recei'in$ /M/ !sin$ AT co%%ands 'ia the Hy"erTer%inal, de'elo"ers can Q"ortQ the A/4II instr!ctions o'er to their "ro$ra%%in$ en'iron%ent, e$. 0is!al Basic, 46477 or 9a'a and also "ro$ra%%ically "arse A/4II %essa$es fro% %ode%. 1. Setti+. u, your (SM mo5em
Most P/M %ode%s co%es with a si%"le %an!al and necessary dri'ers. To set!" yo!r T-Mode%8/B, download the 8/B P/M Mode% T!ic& /tart + *indows , $!ide +FB0&B .;-,. =o! wo!ld e a le to send /M/ fro% the *indows a""lication and also set!" P.R/ connecti'ity. The P/M %ode% will %a" itself as a 45M serial "ort on yo!r co%"!ter. *indows ased control "anel to set!" P/M %ode%, P.R/ and send /M/ 2. Usi+. t8e Hy,erTermi+-< Hi+t ?? By de'elo"in$ yo!r AT co%%ands !sin$ Hy"erTer%inal, it will e easier for yo! to de'elo" yo!r act!al "ro$ra% codes in 0B, 4, 9a'a or other "latfor%s. Po to /TARTU.ro$ra%sUAccessoriesU4o%%!nicationsUHy"erTer%inal +*in 2000, to create a new connection, e$. RMy 8/B P/M Mode%R. /!$$ested settin$s :: - 45M .ort :: As indicated in the T-Mode% 4ontrol Tool - Bits "er second :: 2C0F00 + or slower , - ;ata Bits : J - .arity : None - /to" Bits : 1 - -low 4ontrol : Hardware =o! are now ready to start wor&in$ with AT co%%ands. Ty"e in RATR and yo! sho!ld $et a R5LR, else yo! ha'e not set!" yo!r Hy"erTer%inal correctly. 4hec& yo!r "ort
21
Home Security System settin$s and also %a&e s!re yo!r P/M %ode% is "ro"erly connected and the dri'ers installed. %. I+iti-< setu, AT comm-+5s *e are ready now to start wor&in$ with AT co%%ands to set!" and chec& the stat!s of the P/M %ode%. AT Ret!rns a R5LR to confir% that %ode% is wor&in$ AT74.INSR))))R To enter the .IN for yo!r /IM + if ena led , A R0,1R re"ly confir%s yo!r %ode% is connected to P/M AT74REPV networ& AT74/T Indicates the si$nal stren$th, C1.OO is %a)i%!%. 2. Se+5i+. SMS usi+. AT comm-+5s *e s!$$est try sendin$ a few /M/ !sin$ the 4ontrol Tool a o'e to %a&e s!re yo!r P/M %ode% can send /M/ efore "roceedin$. 3etQs loo& at the AT co%%ands in'ol'ed .. AT74MP-S1 To for%at /M/ as a TEET %essa$e AT74/4ASR7)))))R /et yo!r /M/ centerQs n!% er. 4hec& with yo!r "ro'ider. To send a /M/, the AT co%%and to !se is AT74MP/ .. ATFCM(SGHFyyyyyH IE+terJ N =o!r /M/ te)t %essa$e here M4trl-HN The R7yyyyyR is yo!r recei"entQs %o ile n!% er. Ne)t, we will loo& at recei'in$ /M/ 'ia AT co%%ands. #. Recei:i+. SMS usi+. AT comm-+5s The P/M %ode% can e confi$!red to res"onse in different ways when it recei'es a /M/. -! Imme5i-te - when a /M/ is recei'ed, the /M/Qs details are i%%ediately sent to the host co%"!ter +;TE, 'ia the 74MT co%%and AT74MP-S1 To for%at /M/ as a TEET %essa$e AT74NMIS1,2,0,0,0 /et how the %ode% will res"onse when a /M/ is recei'ed *hen a new /M/ is recei'ed y the P/M %ode%, the ;TE will recei'e the followin$ .. FCMT ? HF 1DDDDDDDDH ; ; H$2B$'B%$;2%?2$?$$F2$H This the te)t /M/ %essa$e sent to the %ode%
#$
=o!r co%"!ter +;TE, will ha'e to contin!o!sly %onitor the 45M serial "ort, read and "arse the %essa$e. 6! Noti@ic-tio+ - when a /M/ is recie'ed, the host co%"!ter + ;TE , will e notified of the new %essa$e. The co%"!ter will then ha'e to read the %essa$e fro% the indicated %e%ory location and clear the %e%ory location. AT74MP-S1 To for%at /M/ as a TEET %essa$e AT74NMIS1,1,0,0,0 /et how the %ode% will res"onse when a /M/ is recei'ed *hen a new /M/ is recei'ed y the P/M %ode%, the ;TE will recei'e the followin$ .. 74MTI: R/MR,C AT74MPRSC MEnterN Notification sent to the co%"!ter. 3ocation C in /IM %e%ory AT co%%and to send read the recei'ed /M/ fro% %ode%
The %ode% will then send to the co%"!ter details of the recei'ed /M/ fro% the s"ecified %e%ory location + e$. C , .. FCM(R? HREC REA&H;HF 1DDDDDDH;;H$2B$'B2';22?2 ?21F2$H This is the new /M/ recei'ed y the P/M %ode% After readin$ and "arsin$ the new /M/ %essa$e, the co%"!ter +;TE, sho!ld send a AT co%%and to clear the %e%ory location in the P/M %ode% .. ATFCM(&G% IE+terJ To clear the /M/ recei'e %e%ory location in the P/M %ode% If the co%"!ter tries to read a e%"ty6cleared %e%ory location, a 74M/ ERR5R : C21 will e sent to the co%"!ter. . Usi+. - com,uter ,ro.r-m to se+5 -+5 recei:e SMS 5nce we are a le to wor& the %ode% !sin$ AT co%%ands, we can !se hi$h-le'el "ro$ra%%in$ + e$. 0B, 4, 9a'a , to send the AT A/4II co%%ands to and read %essa$es fro% the 45M serial "ort that the P/M %ode% is attached to.
#1
#2
SYSTEM RE4UIREMENT
#%
E+"
45 7B <A,D D'S> SPA3E )O, STO,' 3OLO, 7O D6D D,'6E =S7 7ODE7 <O7E SE3;,'T? <A,D/A,E 7O;SE
'TO,*S6=A
= SO)T/A,E" DED+"
3OLO, ,E3O77E
Soft'are 33
7'3,OSO)T /'
DO/S
8P O, <'=<E, 6E,S'O
7'3,OSO)T 6'S;AL BAS'3 :.5 ADOBE P<OTOS<OP ADOBE '7A=E ST?LE, PA,ALLEL PO,T D,'6E,
#2
E+"
= SO)T/A,E" DED+"
3OLO, ,E3O77E
D6D D,'6E /'T< 7;L'T7ED'A S?STE7 =S7 7ODE7 <O7E SE3;,'T? <A,D/A,E 7O;SE
Soft'are 33
7'3,OSO)T /'
DO/S
8P O, <'=<E, 6E,S'O
##
)*O/ CHART
)<o7 C8-rt
St-rt B
&is,<-y M-i+ me+u /tat!s indication Man!al 4ontrol E)it
Main -lowchart
A!to%atic selection
Is Te%"erat!re 6-ire
V
N Is *ater V N
Is 3i$ht
#3
A C
Is /%o&e V
Is 5"tion S E)it V
E)it
N B E+5
#'
Man!al 4ontrol
B &is,<-y Butto+ 3i$ht Motor B!@@er -ans
Is B!@@er S4lic& V N
Bee"in$ 5n65ff
Is 3E;-1 4lic& V N
Is 3E;-2 clic& V
Is 3E;-C 4lic& V
N B
Is 3E;-F 4lic& V
N B B
MO&I)ICATION
AN&
A""*ICATIONS
O. The desi$n of the "ro#ect is s!ch that it can e easily %odified to another a""lication with sli$ht chan$e in hardware and software. 10.A!to%atic ;etection of the 3i$ht and *or&in$ of the -an can e done and Those can e controlled fro% central office , no need for a "erson to $o !"to that "oint.
5!r "ro#ect can e %odified and the %odified "ro#ect find a""lication in 'ario!s fields those are &i,<om- E+.. ?C /t!dy the Technical control of the syste% "8-rm-cy ?C .reser'e the %edical Her s and .lants !sed for the %edicine which are diffic!lt to find and $row -or -loweriest :- .reser'e the .lants which needs the cli%atic condition which is not nat!rally a'aila le Ho66yist i+ )<or- :- To $row the rear s"ecies of the "lant as the ho that %ore so"histication can e achie'ed at lower cost. )-rmer ?- To c!lti'ate and $row the her s , 'e$eta le , etc which cannot e $rown in the a'aila le cli%ate condition ,and which also needs the certain s"ecific condition. Me5ic-< ?C To $row the costly and rear a'aila le her s , "lant !sed in %edicines Bot-+y &e,-rtme+t of science and %edical 4olle$e :- -or st!dy of the "lants which cannot s!r'i'e in the a'aila le te%"erat!re condition and They certain fa'ora le conditions. y. &e.ree E+.. :- /t!dy the technical control and %a&e the i%"ro'e%ent s!ch
SCREEN SHOT
"ROJECT CO&E
MANUA* )ORM
.ri'ate /! c%d3i$ht1K4lic&+, If c%d3i$ht1.4a"tion S RoffR Then c%d3i$ht1.4a"tion S RonR data S data 5r 1HJ 31.-ill4olor S ' Red ElseIf c%d3i$ht1.4a"tion S RonR Then 31.-ill4olor S ' Blac& c%d3i$ht1.4a"tion S RoffR data S data And 1H-I End If 5!t 1HCIJ, data End /! .ri'ate /! c%d3i$ht2K4lic&+, If c%d3i$ht2.4a"tion S RoffR Then c%d3i$ht2.4a"tion S RonR data S data 5r 1HF 32.-ill4olor S ' Red ElseIf c%d3i$ht2.4a"tion S RonR Then 32.-ill4olor S ' Blac& c%d3i$ht2.4a"tion S RoffR data S data And 1H-B End If 5!t 1HCIJ, data End /! .ri'ate /! c%d3i$htCK4lic&+, If c%d3i$htC.4a"tion S RoffR Then c%d3i$htC.4a"tion S RonR data S data 5r 1H2 3C.-ill4olor S ' Red ElseIf c%d3i$htC.4a"tion S RonR Then 3C.-ill4olor S ' Blac& c%d3i$htC.4a"tion S RoffR data S data And 1H-; End If 5!t 1HCIJ, data End /! .ri'ate /! c%d3i$htFK4lic&+, If c%d3i$htF.4a"tion S RoffR Then c%d3i$htF.4a"tion S RonR data S data 5r 1H1 3F.-ill4olor S ' Red
'
Home Security System ElseIf c%d3i$htF.4a"tion S RonR Then 3F.-ill4olor S ' Blac& c%d3i$htF.4a"tion S RoffR data S data And 1H-E End If 5!t 1HCIJ, data End /! .ri'ate /! c%d3i$htGK4lic&+, If c%d3i$htG.4a"tion S RoffR Then c%d3i$htG.4a"tion S RonR data S data 5r 1H10 3G.-ill4olor S ' Red ElseIf c%d3i$htG.4a"tion S RonR Then 3G.-ill4olor S ' Blac& c%d3i$htG.4a"tion S RoffR data S data And 1HEEnd If 5!t 1HCIJ, data End /! .ri'ate /! c%d3i$htBK4lic&+, If c%d3i$htB.4a"tion S RoffR Then c%d3i$htB.4a"tion S RonR data S data 5r 1HJ 3B.-ill4olor S ' Red ElseIf c%d3i$htB.4a"tion S RonR Then 3B.-ill4olor S ' Blac& c%d3i$htB.4a"tion S RoffR data S data And 1H-I End If 5!t 1HCIJ, data End /! .ri'ate /! 5&K4lic&+, 8nload Me fr%ho%esec!rity./how End /! .ri'ate /! -or%K3oad+, 5!t 1HCIJ, 1H0 End /!
AUTOMATIC )ORM ;i% "ort, data, odata As Inte$er ;i% slice ;i% 31, 32, 3C, 3F .ri'ate /! 4o%%and1K4lic&+, 8nload Me fr%ho%esec!rity./how End /! .ri'ate /! -or%K3oad+, "ort S 1HCIO data S 0 Te)t1.Te)t S 0 Ti%er1.Ena led S Tr!e odata S 0 Q5!t 1HCIJ, 1H0 End /! .ri'ate /! Ti%er1KTi%er+, Q-----------3i$ht /ensor and water sensor data S 0al+In"+"ort,, Te)t2.Te)t S He)+In"+"ort,, If data S 1HC- Then odata S odata And 1H0 odata S odata 5r 1H; li$ht.-ill4olor S ' Red water.-ill4olor S ' Red s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Blac& QTi%er2.Ena led S Tr!e End If Q---------------------------All sensors nor%al not acti'ated If data S 1HG- Then odata S 0 li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Blac& Department Of Electronics and Telecommunication 3$
te%"erat!re.-ill4olor S ' Blac& Q Ti%erC.Ena led S Tr!e End If Q--------------------------water and s%o&e /ensor If data S 1HB- Then odata S odata And 1H0 odata S odata 5r 1HI li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Red s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Blac& QTi%erF.Ena led S Tr!e End If Q------------------ *ater and te%"erat!re If data S 1H-- Then odata S odata And 1H0 odata S odata 5r 1H1G li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Red s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Red QTi%erG.Ena led S Tr!e End If QQSSSSSSSSSSSSSSSSSSSSSSSSSSSSS*ater , li$ht and /%o&e If data S 1H2- Then odata S odata And 1H0 odata S odata 5r 1Hli$ht.-ill4olor S ' Red water.-ill4olor S ' Red s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Blac& QTi%erB.Ena led S Tr!e End If QWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW/%o&e If data S 1HF- Then odata S odata And 1H0 Department Of Electronics and Telecommunication 31
odata S odata 5r 1HC li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Blac& QTi%erI.Ena led S Tr!e End If Q----------------------------------------li$ht If data S 1H1- Then odata S odata And 1H0 odata S odata 5r 1HO li$ht.-ill4olor S ' Red water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Blac& QTi%erJ.Ena led S Tr!e End If Q-----------------------------------------Te%"erat!re , water and li$ht If data S 1HB- Then odata S odata And 1H0 odata S odata 5r 1H1; li$ht.-ill4olor S ' Red water.-ill4olor S ' Red s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Red QTi%erO.Ena led S Tr!e End If Q-----------------------------------------te%"erat!re If data S 1H;- Then odata S odata And 1H0 odata S odata 5r 1H11 li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Red
32
QTi%er10.Ena led S Tr!e End If Q-------------------------------------water , te%"erat!re and s%o&e If data S 1HE- Then odata S odata And 1H0 odata S odata 5r 1H1I li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Red s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Red QTi%er11.Ena led S Tr!e End If Q----------------------------------li$ht and /%o&e If data S 1H- Then odata S odata And 1H0 odata S odata 5r 1H1B li$ht.-ill4olor S ' Red water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Blac& QTi%er12.Ena led S Tr!e End If Q--------------------------------te%"erat!re and /%o&e If data S 1H4- Then odata S odata And 1H0 odata S odata 5r 1H1C li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Red QTi%er1C.Ena led S Tr!e End If Q-----------------------------------*ater , 3i$th , Te%"erat!re and /%o&e If data S 1HA- Then Department Of Electronics and Telecommunication 3%
odata S odata And 1H0 odata S odata 5r 1H1li$ht.-ill4olor S ' Red water.-ill4olor S ' Red s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Red QTi%er1F.Ena led S Tr!e End If Q------------------------------------li$ht and Te%"erat!re If data S 1HO- Then odata S odata And 1H0 odata S odata 5r 1H1O li$ht.-ill4olor S ' Red water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Red QTi%er1G.Ena led S Tr!e End If Q------------------------------------3i$ht , s%o&e and Te%"erat!re If data S 1HJ- Then odata S odata And 1H0 odata S odata 5r 1H1B li$ht.-ill4olor S ' Red water.-ill4olor S ' Blac& s%o&e.-ill4olor S ' Red te%"erat!re.-ill4olor S ' Red QTi%er1B.Ena led S Tr!e End If Q-------------------------------------water If data S 1HI- Then odata S odata And 1H0 odata S odata 5r 1HO li$ht.-ill4olor S ' Blac& water.-ill4olor S ' Red s%o&e.-ill4olor S ' Blac& te%"erat!re.-ill4olor S ' Blac& QTi%er1I.Ena led S Tr!e End If
32
Te)t1.Te)t S He)+odata, 5!t 1HCIJ, odata End /! .ri'ate /! Ti%er2KTi%er+, odata S odata And 1HF0 /ha"e2.-ill4olor S ' Blac& Ti%er1.Ena led S -alse End /! .ri'ate /! Ti%erCKTi%er+, odata S odata And 1H20 /ha"eC.-ill4olor S ' Blac& Ti%erC.Ena led S -alse End /! .ri'ate /! Ti%erFKTi%er+, odata S odata And 1H10 /ha"eF.-ill4olor S ' Blac& Ti%erF.Ena led S -alse End /! .ri'ate /! Ti%erGKTi%er+, odata S odata And 1HJ0 /ha"e1.-ill4olor S ' Blac& Ti%erG.Ena led S -alse End /! .ri'ate /! Ti%erBKTi%er+, odata S odata And 1HG0 Department Of Electronics and Telecommunication 3#
End /! .ri'ate /! Ti%erIKTi%er+, odata S odata And 1HC0 /ha"eC.-ill4olor S ' Blac& /ha"eF.-ill4olor S ' Blac& Ti%erI.Ena led S -alse
End /! .ri'ate /! Ti%erJKTi%er+, odata S odata And 1HB0 /ha"eC.-ill4olor S ' Blac& /ha"e2.-ill4olor S ' Blac& Ti%erJ.Ena led S -alse
End /! .ri'ate /! Ti%erOKTi%er+, odata S odata And 1H40 /ha"e1.-ill4olor S ' Blac& /ha"e2.-ill4olor S ' Blac& Ti%erO.Ena led S -alse
Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er10KTi%er+, odata S odata And 1HA0 Department Of Electronics and Telecommunication 3
/ha"e1.-ill4olor S ' Blac& /ha"eC.-ill4olor S ' Blac& Ti%er10.Ena led S -alse Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er11KTi%er+, odata S odata And 1HO0 /ha"e1.-ill4olor S ' Blac& /ha"eF.-ill4olor S ' Blac& Ti%er11.Ena led S -alse Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er12KTi%er+, odata S odata And 1HI0 /ha"e2.-ill4olor S ' Blac& /ha"eC.-ill4olor S ' Blac& /ha"eF.-ill4olor S ' Blac& Ti%er12.Ena led S -alse Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er1CKTi%er+, odata S odata And 1HB0 /ha"e1.-ill4olor S ' Blac& /ha"eC.-ill4olor S ' Blac& /ha"eF.-ill4olor S ' Blac& Ti%er1C.Ena led S -alse Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er1FKTi%er+, odata S odata And 1H;0 Department Of Electronics and Telecommunication 33
/ha"e1.-ill4olor S ' Blac& /ha"e2.-ill4olor S ' Blac& /ha"eF.-ill4olor S ' Blac& Ti%er1F.Ena led S -alse Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er1GKTi%er+, odata S odata And 1HE0 /ha"e1.-ill4olor S ' Blac& /ha"e2.-ill4olor S ' Blac& /ha"eC.-ill4olor S ' Blac& Ti%er1G.Ena led S -alse Q5!t 1HCIJ, odata End /! .ri'ate /! Ti%er1BKTi%er+, odata S odata And 1H-0 /ha"e1.-ill4olor S ' Blac& /ha"e2.-ill4olor S ' Blac& /ha"eC.-ill4olor S ' Blac& /ha"eF.-ill4olor S ' Blac& Ti%er1B.Ena led S -alse Q5!t 1HCIJ, odata End /!
3'
SMS )ORM
.ri'ate /! 4o%%and1K4lic&+, Me.Hide fr%/ensor./how End /! .ri'ate /! 4o%%and2K4lic&+, End End /! .ri'ate /! 4o%%andCK4lic&+, M/4o%%1.5!t"!t S RATR 1 ' 4r3f M/4o%%1.5!t"!t S RAT7453.S1R 1 ' 4r3f M/4o%%1.5!t"!t S RAT74MP-S1R 1 ' 4r3f M/4o%%1.5!t"!t S RAT74MP/SR 1 4hr+CF, 1 0al+/M/Test.Te)t2.Te)t, 1 4hr+CF, 1 ' 4r3f QRe"lace this with yo!r %o ile .honeQs No. M/4o%%1.5!t"!t S Te)t1.Te)t 1 4hr+2B, M/4o%%1.5!t"!t S RAT74MP/SR 1 4hr+CF, 1 0al+/M/Test.Te)tC.Te)t, 1 4hr+CF, 1 ' 4r3f QRe"lace this with yo!r %o ile .honeQs No. M/4o%%1.5!t"!t S Te)t1.Te)t 1 4hr+2B, M/4o%%1.5!t"!t S RAT74MP/SR 1 4hr+CF, 1 0al+/M/Test.Te)tF.Te)t, 1 4hr+CF, 1 ' 4r3f QRe"lace this with yo!r %o ile .honeQs No. M/4o%%1.5!t"!t S Te)t1.Te)t 1 4hr+2B, M/4o%%1.5!t"!t S RAT74MP/SR 1 4hr+CF, 1 0al+/M/Test.Te)tG.Te)t, 1 4hr+CF, 1 ' 4r3f QRe"lace this with yo!r %o ile .honeQs No. M/4o%%1.5!t"!t S Te)t1.Te)t 1 4hr+2B, M/4o%%1.5!t"!t S RAT74MP/SR 1 4hr+CF, 1 0al+/M/Test.Te)tB.Te)t, 1 4hr+CF, 1 ' 4r3f QRe"lace this with yo!r %o ile .honeQs No. M/4o%%1.5!t"!t S Te)t1.Te)t 1 4hr+2B, End /! .ri'ate /! -or%K3oad+, *ith M/4o%%1 .4o%%.ort S 1 Q"ort no. in ;e'ice Mana$erUMode%U...Mode% for %o ile ./ettin$s S ROB00,N,J,1R .Handsha&in$ S co%None Qco%RT/ for %o ile .RT/Ena le S Tr!e .;TREna le S Tr!e .RThreshold S 1 ./Threshold S 1 .In"!tMode S co%In"!tModeTe)t .In"!t3en S 0 ..ort5"en S Tr!e Q%!st e the last End *ith End /!
31
BIB*IO(RA"HY
'$
The sources and references used for our pro"ect. B.B data %icro"rocessor hand oo& ;i$ital .rinci"les Modern ;i$ital Electronics Microco%"!ter and Micro"rocessor 0is!al Basic Blac& Boo& National /e%icond!ctor Man!al .arallel .ort 4o%"lete /erial .ort 4o%"lete Ad'anced ;os .ro$ra%%in$ - Ray ;!ncan
BIB*IO(RA"HY
'1
&ATA SHEETS
'2