And I'vesaidthatarteryknowsthey'regoodfordoingthingslikecreating a sensorsorbeingabletotriggerphysicalevents.
Butifyou'regonnadosomethinglikeRenee, a Webserver, thenyoushouldreallyuse a raspberrypi.
Andofcourse, asthingsgointhetechnologyworld, youactuallycan't kindasortacando a Webserveroffguard.
Weknow.
Sotoday I'm goingtoshowyouusinganInternetshieldhowtorun a websiteoffofyourdoweknow.
Sobasically, youhaveanInternetshieldthat's connectedtoyourArduino, andthatEthernetshieldhas a microSDcardslotonthat C.
Youcanput a microSDintheirandessentiallyreadfromthemicroSDinordertopresent a websitetowhoeverwillbegoingtothe I P addressofyourDoweknownow?
I willsaywhatwillsaymoreorless, moreorless, I stillstick.
Bymypreviousopinion, I'm gonnaberunning a Webserver.
Uh, atleast I wouldwantis a raspberrypi.
But, youknow, forsomereasontheremightbe a reasonthatyouwouldwanttouseanArduinoinordertodeliver a websitefromfromsimple, simplethings, suchasit's hardertohacksomethinglikeanArduino.
Sinceanarterynodoesn't have a fullfledgedoperatingsystem, sinceitdoesn't havemyspeakwheelerPHPoranyofthatkindofstuff.
It's notnecessarilyaslargeovenattackriskassomethinglike a raspberrypimightbe.
Sobasically, whenyou'reusinganInternetshieldinordertodeliver a WebPagetwoclients, whatthiswillallowyoutodoisitallowyoutosendanytypeofWebpagetypestuffthatwouldbeclientsideinterpreted.
Sowhat I meanbythatis a t m l right.
SoitsendstheHTMLtext, andthenyourWebbrowserturnsthatHTMLinto a websiteJavaScriptJavascriptis a clientsidescriptinglanguage.
Sowhydon't I showyouhowtodotodayiswe'regoingtouse a We'regoingtocreate a simpletextwebsite.
SothiswillbeanHTMLwebsite, andonthat I willembedanimagefromfailnormaldotcomand I willalsoembed a videofromYouTube s O thatshowsyouhowtobasicallydo a simplewebsiteandbeabletoembedassetsfromotherWebproperties.
Sothisis a sane, smartboard, andasyoucansee, there's a littlebitofdifferencebetweenthetwo.
Soifyou'regoingtodosomethingliketrytobuild a littleWebserverlike I amjustrealizedifyourdealdealingwith a differentInternetshield, youmayrunintosomesomedifferentissuesthatyouhavetodealwith.
Sotheshieldthat I amusingistheactualreferencemodelthatcomesfromhard.
Thisisgoingtobeourlittlearedoing a Webserverfortheproject, solet's gooverandtake a lookatthecode.
Sobeforewetake a lookattheArduinosketch, let's take a lookattheMicroSDcardandtheHTMLfilethatwe'regoingtobesavingthere.
SothefirstthingtorealizeisthattheInternetShieldisnotabletoreadtheNT F s filesystem, theAP F s filesystemoreventhe X fatfilesystem.
Itcanonlyreadthefatfilesystemsofat 16 orfat 32.
Now, ifyou'reusing a microSDcardthatyouyou'veputintoanykindofmoderncameraorcamcorder, itwillmostlikelyhaveformattedyourmicroSDcardto X fatsoyoucanputtheindexdotHTMHTMfileontoan X factormicroSDcard.
Soonewayortheother, youdohavetoformatthemicroSDcardforfact, thenpastthatwecangoandwecantake a lookatthecodethatisonthe I hatetosaycodeoryouletus a codetagscameout.
Let's take a lookattheHTML.
That's onlytheindex s We'regonnacallthisindexdotHTMAndsowe'reactuallygoingtoreferencethisnamewithintheArduinoscare a scriptsketch.
Soifyouchangeusto a differentname, thenwejusthavetochangethatnameinthesketch.
Let's take a lookatthis.
Andasyoucanseerightherewhere I'm justusingcrappyoldstandardhtml p strong, strongisbold.
Hey, look, a webpage.
SurferMenard.
Weknowclose, strong, close P.
Here's a listopenonourlist.
FirstlessdiademSecondlistdiedonthirdlist.
Itemclose, close, closeandthencloseonorderlist.
Thenweuse 82 Here's a pictureembeddedfromtheWeb.
Closeage, too.
Again, I'm usingtheimageSRCtagongrabbing.
I justgrabbed a randomasspictureoffoffailnormaldotcom, andwegodownbelow.
Thatate, too.
Here's animpediment.
Embeddedvideo.
Andwiththis I simplyusedthe I frame, thighframeinbedscriptthatyoucouldgrabfromYouTubevideo.
Andsothezeromonitorisgoingtobeimportantforus, especiallyintroubleshooting, becausethefirstthingthatisgoingtodoistelluswhatthehellthe I P addressisofourTorinodeviceagain.
Sincewe'reonlyfeedingtheMacaddresshereisgoingtograban I P addressfromthe A, C.
P andsoifwe'regonnagotoitas a Webpage, weneedtoknowwhatthe I P addresses.
Socereal, thatprintlineafternotinternetdot a local i p.
Sothisfunctionreturnswhatthe i p addressesanditwillprintthatoutontheserialmonitor, thenhere, allofthisstuffinhere.
WeknowandputthemicroSDcardin, and I'llshowyouhowthisworks.
Okay, sohere I pluggedinthepluggedintheEthernetcableplugged, pluggedinthe U.
S.
B cable.
Sothiswillgiveuspowerandwillgiveus a serialmonitoragain.
Doyouremember?
Ifyougivethisdevice a static I p address, youdon't havetoThenplugthisinto a computeratall.
Youcouldsimplyplugthisinto a walloutletorplugthisinto a USBwalloutoutlettypethingandhaveitentirelypoweredonitsown.
Sojustbesittingin a cornerandthenwehaveourlittlemicroSDcardslottedinuptheresothatlet's gotothecomputerortoolswillgotoserialmonarchwillseewhatthisgivesus.
Okay, sowehaveour i p address.
0 10.1 not 14 waytheinitializingSDcardsuccessinsuccess s.
Sothisis a goodwaytomakesurethattheSDcardisactuallybeingseenandthenthatthefileisfound.
YoucanyoucanpresentimagesfromthemicroSDcard, butagain, thatgets a littlebitmoreconvoluted.
Uh, then, yeah, youprobablybetteroffwith a raspberrypi.
OneofthingsthatwillsaywiththatMacaddressisifyoubuythestandardagain, theactualInternetshieldfromourdoweknowthereis a stickerontheback, andthestickeronthebackgivesyoutheMacaddressforthisspecificdevice s O.
Ifyou'rewonderingwhattheMacaddressshouldbe, ifyoubuythereferenceEthernetshield, thereshouldbe a stickeronthebacktotellyouwhatitisandsoon.
Andso, yeah, that's reallyallthereis.
Doitagain.
TheoneofthebigthingstobecarefulaboutismakesurethatyourmicroSDcardisformattedfat, not x fatbutfat.