Sothenallwe'regoingtogodoisgoingtogodownhereandthenwe'regoingtoserialprinteverythingoutsoyoucanseeit's a serialdotprint, sodistance.
Soit's goingtosaydistance, colonspaceandthenitwillprintthedistanceincentimeters, thevaluefordistance, cm.
Thenwe'regonnaprintout a coupleofspaces, putCManothercoupleofspaces, buthyphenputanothercoupleofspacesagain.
Justbasicformattingstuffgotputinthecode.
Thenwe'regoingtodoserialdotprintdistancethevalueforthevariabledistanceinchthat's gonnaprintouttheywereon a serialprintline, soprintLnwhat's gonnahappenisgoingtoprintthisoutandthenit's gonnagoto a newline.
Andthen, youknow, basicallyweput a coupleofinchesthereorweput a coupleofspacesthere.
Thenwesayinchesandthenwe'llgotothenextline.
Thenextthingthatwedohereiswe'regoingtodo a delay.
Sothedelayhereisinmilliseconds, eh?
Sowe'regoingtosay 1000 milliseconds.
Thismeansonesecond.
Now, withthisdelay, youcanputthisdelayed.
Whateverthehellyouwant.
I putittoonesecondsothat I canactuallyreadwhatthehell's goingbyonthescreen.
Butaswitheverythingyouknow, ififthey'redoingsomething a littlebitdifferently, youmaygetsomereallyweirdreadingsbecauseofthat, andthenyouhavetofigureouthowtodesignyouroverallprojecttobeabletocompensateforthat.
Soagain, ifyou'regonnabeusingultrasonicsensorsonsomethinglikeon a timehisvehicle, whatyourealizeishaving a singlesensoronthatautonomousvehicleprobablyisnotgoingtobe a greatidea.