Well, oneofthereasons, maybe, isthatmaybesomeplansgetMaursunlightthanotherplants, soyoucanuse a photoresistortobeabletofindoutwhatthevalueoflightinanenvironmentis, andthenbeabletologthatinto a databaseorwereinto a fileorsomethinglikethatsothatyoucangobackandthenanalyzetheinformation.
Andagainit's a little a littlewonkycomparedThioHouseontheelectronicprojectswecreateourSothefirstthingiswehaveourvccWehaveourfiveoldandthatisgoingintothepositivepenonthisphotoresistorsensor.
Sothatcomesinherethenthenextthingthatwehavegoingon, whichiskindofweird, iswehave a resistor.
Youhaveoneprongsoftheresistorandthenyouhavethecensorallin a lineandthenthesensorgoesoveryourfear a five, thenwhatyouhaveisyouhavetheresistorandtheresistor, thencomesoverandactuallyconnectstothenormalground.
Thisiskindof a wonkything.
Wehaven't seenthis a lotin a lotofprojects, butbasically, whenyou'rehavingthephotoresisterissothesensorwireisoffofthegroundoffofthephotoresistor.
Soagain, ifyou'redoingif l statements, ifyou'reusing a 4.7 k resistorandyou'reusingif l statements, thenyou'regonnahavetorealizeyournumbersaregoingtobeinthehundreds.
Whereasifyouuse a 220 ohmresistor, thenyouhavetorealizeyourvaluesaregoingtobeinthetents.
Let's let's uploadthiscodeand I canshowyouhowthisworks.
Okay, so I uploadedthecodewehaveare, weknow, pluggedintoourcomputersowecanreadtheserialmonitorandalsopowertheartawaynow.
Andherewehaveourlittlephotoresistors.
Whatwe'regonnadoiswritethetoolsweregoingopen, serialmonitor, andthenwe'regoingtoseeatthevalueatthephotoResisterisseen, soyoucanseethisis a verywelllitenvironment.
Sothisisinmystudio.
I have a lotoflightspointedatme, and I'm gettingundervaluesomewherebetween 92 95.
Nowitisimportantwiththeseanalogsensors.
Thenumberisyougettobe a bitflaky.
A lotoftimesyouget a rangeofnumbers.
It's notsimplythatyouget 95.
Justconstantlygetthat a lotoftimeswiththefluctuationswithelectricity, yourfluctuationswith a sensor, youwillget a range.
Andsowiththis, eventhoughthelightisn't changingandall, weget a rangeofaboutfiveyouknow, anywherebetween 89 toabout 95.
Andsothisisjustsomethingtokeepinmindwhere, wheneveryou'reusingthevaluesofanalogsensorsforvariablesforif l statementsyou, youdon't wanttobetooprecisewithright, sowecanseethisis 90 or 89.
So I maywanttotriggersomethingtohappenat 70 or 60.
I probablywouldn't wouldn't wantsomethingtohappenbetween 88 89 ifthatmakesanykindofsensesothatwecanseeyouliketosayit's gettingoverbetween 89 about 95.
Nevercomeover.
And I putmyhandoverthesensor.
Wecanseenowthelightlevelhasdropped.
Andnow, nowagain, we'reseeing, like 53 54 we'restillgettingthatfluctuation.
Nowif I reachunderneaththetableandactuallyturnoutthelightstomystudiosowecanseeit's prettydarkrightnow, Thenwecanseethenumbergoesdown, youknow, somewherebetween 13 to 16.
Soitisimportanttounderstandthatoverthere I actuallystillhavesomelightsonintherestofmybasement.
Andsothisisstillabletoreadthoselights.
Soat a darklevellikethis, we'restillgettingthatnumber.
I completelyputmyhandoverit.
Thenwecanseewegoallthewaydowntozero.
Buttheimportantthingtoseeisthatyoureallydoget a wide, widerangeofvalueshere, dependingonhowmuchlightthesensorisactuallyreading.
YouputoneofthosethatlittleLordweknowprojectsthereagainwiththesoilmoisturesensor, maybe a temperaturesensor, andyoucanhave a nicelittleenvironmentalsensorsuite.
Oneoftheproblemsyoumayruninto, though, iswhathappensifit's cloudy, orwhathappensif a stormcomesinright, So a lotoftimespeople's productivitygoesdown, basedoffofthelightlevel.
Sohave a lotoflightisprovidedinyourofficeenvironmentbythenaturallightsituation.
Iftheoutsidegetsdark, forsomereason, having a sensorlikethisbeabletotriggerinternallengthstoturnonmightbe a valuablethingagain.
Insteadofsimplyhavingpeoplemanuallyturnlightsonormaynoyturnlightsoff, youknowyoucouldhave a sensor, andthissensorsaysOkay.