Soweputthosetwoaside, wecantake a lookhow I builtthisparticularproject.
Soagain, youcanseewehavetheyard.
Weknowboard.
Overherewehaveourinfraredsensor.
Andsowhat I didis I justkindofmountedthisinfraredsensorusingwhenhestandoffs a coupleofnylonscrewsandnylonnylonnutandputitontothislittleplasticthing.
Andbasically, I didthatsothat I cantesthowthisworks, right?
Soif I plugtheinfraredsensorintosomethinglike a breadboard, thenwhen I didthat, itwouldpointstraightup, anditwouldn't giveme a goodfeelforhowtheinfraredsensorworks.
intheenvironmentthat I wanted.
Soif I'm gonnabeusingoneoftheseinfraredproximitysensors, I'm generallywanttobeusingiton a vehicleandgenerally, ifit's gonnavehiclethanitisgoingtobepositionhorizontally.
Soputtingonto a littleplasticapparatuslikethisjustmakesiteasiersothathookingitup, it's brokeprettysimple.
Youhave a sensor, andthenyoujusthavethethreewires.
I'vesetthisfor a delayof 500 millisecondsabouthalf a second, sothisisfastenoughtoseeitoperateratherquickly, butstillslowenoughthatwecanactuallyperceivewhatit's doingsothatwhatwe'regonnadoiswe'regonnauploadthiscodetotheArduinoandthentake a looktoseewhattheresultsare.
Solikeoneoftheproblemswithultrasonicdistancesensorsisthatifanobjectcomesatthemfrom a sharpanglelike a 45 degreeangle, theywon't workproperlybecausethesignalcomesoutanditreflectsinanotherdirectionanddoesn't gobackthereceiver.
Oneofthecoolpartsabouttheinfraredsensoristhat, asyoucansee, evenifyoucomeinat a verysteepangle, it's stillabletodetectthatthere's anobjectthere.
Normally, whenyouseethesevehicles, there's anarrayofsensors, soyoumayhaveanultrasonicdistancesensorandthattriestodetect a longerdistanceandtriestogivethevehicleMaurinformationsowecantrytopreplanwhatitsroutesgoingtobe.
You'llhave a bumpersensorsoright, obviously, ifthevehicleyouknow, ifififalltheothersensorsfailandthevehiclebumpsupagainstsomething, you'regonnawanttohave a bumpersensor s sothatwhenitphysicallymakescontactwithsomething, itisabletoreacttoit, but a waythatyoucanhavethevehiclereactwhenitgetsclosetoanobject, butnotsoclosethatitactuallyhits.