ArduinofortheEvilGenius:ACompleteHandbooktoDevelopaSmartHome
SecuritySystem
Copyright©2017,ProfNaf
Preface
Arduino,onboardmicro-controller,hasbeenconsideredtobeapopulargearforbuildingdigital
devices.WiththeintroductiononArduino,thesedigitaldevicesinteractwiththephysicalworldby
sensingandcontrollingvariousobjectsfromtheenvironment.Thisbooktitled"ArduinofortheEvil
Genius:acompletehandbooktodevelopasmarthomesecuritysystem"hasbeenpreparedand
presentedalsotointroduceArduinoforkidsandevenintroduceArduinoforDummies.also.Thus,this
Arduinoprojecthandbookprovidesastepbystepguidancealongwiththerelevantcodestodevelopa
smarthomegadget,whichautomatesandsecuresourhome.ThissolutionusesArduinoUNOandfew
othersensorstodetectthepresenceofintruders.Moreover,aultrasonicsensorisusedasaradarwhich
canautomaticallydetectthreats.Furthermore,aPIRsensorisusedtodetecthumanpresencewithan
integratedalarmsystem.Thebookisdividedintoseveralchapterswherethefirstchapterdiscusseson
therequiredhardwareandsystemdesign.Later,installationofthehardwarecomponentsandrequired
codesinrelevantlanguagesareexplained.So,letsenjoytheride.
ProfNaf
August2017
ComponentsandSystemDesign
Inordertodevelopasmarthomesecuritysystem,followingcomponentsarerequired,
•
ArduinoUNO
•
UltrasonicSensor
•
PIRSensor
•
LEDlight
•
Breadboard
•
ServoMotor
•
Jumpers
Oncealltheabovementionedcomponentsareconnectedwiththebreadboardasperthefollowing
picture.
Codes(ArduinoUNOandProcessing)
Onceallthecomponentsarepluggedinaccordingtotheguideline,implementthefollowingcodes
inyoursystem.
CodesfortheArduinoUNOareasfollows,
Step1:EnvironmentVariablesandsetupmethod
Step2:Loopmethod
Step3:Calculationmethod
RadarView:
ToviewasRadar,Userrequirestodownload"Processing".Thus,googleittoget"processing"
AddthefollowingjavacodesintoProcessing
Part1:
Part2:
Part3:
Part4:
SampleOutput