{"id":1327,"date":"2017-11-02T19:07:38","date_gmt":"2017-11-02T19:07:38","guid":{"rendered":"http:\/\/bryceautomation.com\/?p=1327"},"modified":"2021-08-26T00:52:14","modified_gmt":"2021-08-26T00:52:14","slug":"photo-resistor","status":"publish","type":"post","link":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/","title":{"rendered":"Photo Resistor (LDR)"},"content":{"rendered":"<h2>Introduction to the Photo Resistor (LDR)<\/h2>\n<p>A photo resistor (LDR) will change it&#8217;s resistance based on the lighting we apply to this component.\u00a0 \u00a0Also known as a Light Dependent Resistor,\u00a0 we use them in our every day life.\u00a0 \u00a0We use photo resistors to energize night lights in our house.\u00a0 Furthermore, we use them in security lights, or in your automobile.\u00a0 \u00a0This allows your vehicle to automatically energize the headlights when it&#8217;s dark outside.\u00a0 Here I will create a simple circuit that will energize an LED light when the room is dark.<\/p><div id=\"bryce-1174044929\" class=\"bryce-afterfirst bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"7728240895\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n<h2>Getting measurements<\/h2>\n<p>Before designing the circuit, let&#8217;s find the resistance under a lighted condition.\u00a0 \u00a0You also need to find the resistance that we expect in a dark condition.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1328 size-medium lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrlight-e1509645012413-300x287.jpg\" alt=\"LDR Lighted\" width=\"300\" height=\"287\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrlight-e1509645012413-300x287.jpg 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrlight-e1509645012413-768x734.jpg 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrlight-e1509645012413-1024x978.jpg 1024w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrlight-e1509645012413.jpg 1000w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/287;\" \/><\/p>\n<p>Under the Lighted condition, we have about .575 Kilo ohms.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1329 size-medium lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrnolight-e1509645174588-225x300.jpg\" alt=\"LDR No Light\" width=\"225\" height=\"300\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrnolight-e1509645174588-225x300.jpg 225w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrnolight-e1509645174588-768x1024.jpg 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ldrnolight-e1509645174588.jpg 750w\" data-sizes=\"(max-width: 225px) 100vw, 225px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 225px; --smush-placeholder-aspect-ratio: 225\/300;\" \/><\/p>\n<p>With the light shut off, we have 269.5 Kilo Ohms.<\/p>\n<h2>Measure the Voltage Drop<\/h2>\n<p>I&#8217;ve placed the LDR in series with a 10K resistor.\u00a0 \u00a0We can easily calculate the voltage drop of the LDR during low and high intensity lighting, but let&#8217;s just run a simulation in <a href=\"http:\/\/tinkercad.com\">tinkercad<\/a> to see what happens.<\/p>\n<p>Here is our voltage drop under dark conditions.\u00a0 \u00a0The LDR is dropping very little voltage:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1330 lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/NoLight.png\" alt=\"Lights Off\" width=\"1026\" height=\"279\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/NoLight.png 1026w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/NoLight-300x82.png 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/NoLight-768x209.png 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/NoLight-1024x278.png 1024w\" data-sizes=\"(max-width: 1026px) 100vw, 1026px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1026px; --smush-placeholder-aspect-ratio: 1026\/279;\" \/><\/p>\n<p>Now, let&#8217;s check the voltage drop under full light:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1331 lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/FullLight.png\" alt=\"Full Light\" width=\"1031\" height=\"258\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/FullLight.png 1031w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/FullLight-300x75.png 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/FullLight-768x192.png 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/FullLight-1024x256.png 1024w\" data-sizes=\"(max-width: 1031px) 100vw, 1031px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1031px; --smush-placeholder-aspect-ratio: 1031\/258;\" \/><\/p>\n<p>Here, we can see that we are dropping almost all of the voltage.<\/p>\n<p>We need to decide on a threshold at which we want our LED to energize.\u00a0 \u00a0Let&#8217;s say, we want the LED to energize when the voltage drop of the LDR falls below 1 volt.<\/p>\n<h2>Write the code<\/h2>\n<p>Here, we will use the Analog Input example which comes with your arduino software.\u00a0 \u00a0Replace the code within the void loop() function as follows<\/p>\n<p><em><strong>Note:\u00a0 If this code gives you errors, type it manually.\u00a0 \u00a0Sometimes by copying and pasting, you end up with some stray characters!<\/strong><\/em><\/p>\n<pre>[sourcecode language=\"C++\"]\nint sensorPin = A0; \/\/ select the input pin for the potentiometer\nint ledPin = 13; \/\/ select the pin for the LED\nint sensorValue = 0; \/\/ variable to store the value coming from the sensor<\/pre>\n<p>void setup() {<br \/>\n\/\/ declare the ledPin as an OUTPUT:<br \/>\npinMode(ledPin, OUTPUT);<br \/>\n}<\/p>\n<p>void loop() {<br \/>\n\/\/ read the value from the sensor:<br \/>\nsensorValue = analogRead(sensorPin);<br \/>\nif (sensorValue &lt; 200){<br \/>\ndigitalWrite(ledPin,HIGH);<br \/>\n}else{<br \/>\ndigitalWrite(ledPin,LOW);<br \/>\n}<br \/>\n}<br \/>\n[sourcecode]<\/p>\n<p><em><strong>Note: <\/strong><\/em><em><strong> The value of 200 is about 1\/5th of 1024 which would give us a threshold of around 1 volt.<\/strong><\/em><\/p>\n<p>Now let&#8217;s test our code during light conditions:\u00a0 You will notice the LED is OFF.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1332 lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/LEDOFFTINKER.png\" alt=\"LED OFF\" width=\"721\" height=\"214\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/LEDOFFTINKER.png 721w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/LEDOFFTINKER-300x89.png 300w\" data-sizes=\"(max-width: 721px) 100vw, 721px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 721px; --smush-placeholder-aspect-ratio: 721\/214;\" \/><\/p>\n<p>Then we will test the code under dark conditions:\u00a0 \u00a0You will notice the LED is ON!<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1333 lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/LEDONTINKER.png\" alt=\"LED ON\" width=\"707\" height=\"219\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/LEDONTINKER.png 707w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/LEDONTINKER-300x93.png 300w\" data-sizes=\"(max-width: 707px) 100vw, 707px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 707px; --smush-placeholder-aspect-ratio: 707\/219;\" \/><\/p>\n<p>Let&#8217;s try this again in real life:<\/p>\n<p><strong>Lights On:<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1334 size-large lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realon-1024x768.jpg\" alt=\"Real Lights On\" width=\"1024\" height=\"768\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realon-1024x768.jpg 1024w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realon-300x225.jpg 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realon-768x576.jpg 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realon.jpg 1000w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/768;\" \/><\/p>\n<p><strong>Lights Off:<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1335 size-large lazyload\" data-src=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realoff-1024x768.jpg\" alt=\"Real Lights Off\" width=\"1024\" height=\"768\" data-srcset=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realoff-1024x768.jpg 1024w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realoff-300x225.jpg 300w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realoff-768x576.jpg 768w, https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/realoff.jpg 1000w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/768;\" \/><\/p>\n<p>Instead of just energizing a single LED indicator, you could energize a relay that will control a much larger load.\u00a0 It&#8217;s important to realize, however, that you are limited to about 20mA continuous current on the output pin.\u00a0 \u00a0In this case, you would use a transistor such as the 2n2222, or 3904.\u00a0 Another key point is that a relay is inductive.\u00a0 This means that when you shut off the relay, you will produce a voltage spike.\u00a0 If you reverse bias a diode across the relay coil, you would eliminate this problem.\u00a0 The voltage spike will be in the opposite direction of the current normally flowing through the coil.\u00a0 You will hear terms like Snubber, Surge Suppressor, or Fly-back diode to describe the device suppressing the voltage spike from the coil.<\/p>\n<p>For more information on basic components and projects, visit the <a href=\"https:\/\/bryceautomation.com\/index.php\/category\/beginner\/\">beginner&#8217;s category page!<\/a><\/p>\n<p>&#8212; Ricky Bryce<\/p>\n<div id=\"bryce-1539959574\" class=\"bryce-after-content bryce-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8316758073402323\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block;\" data-ad-client=\"ca-pub-8316758073402323\" \ndata-ad-slot=\"4667596182\" \ndata-ad-format=\"auto\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Introduction to the Photo Resistor (LDR) A photo resistor (LDR) will change it&#8217;s resistance based on the lighting we apply to this component.\u00a0 \u00a0Also known as a Light Dependent Resistor,\u00a0 we use them in our every day life.\u00a0 \u00a0We use photo resistors to energize night lights in our house.\u00a0 Furthermore, we use them in security <a class=\"moretag btn btn-primary\" href=\"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/\">Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":1336,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9],"tags":[61,83,82],"class_list":{"0":"post-1327","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-arduino-other-microprocessors","8":"category-intermediate","9":"tag-arduino","10":"tag-ldr","11":"tag-photoresistor","12":"czr-hentry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Photo Resistor Setup and Configuration for use with Arduino Uno<\/title>\n<meta name=\"description\" content=\"We will measure and setup a photo resistor (LDR) for use in the Arduino processor. An LED will energize when dark, and shut off under light.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Photo Resistor Setup and Configuration for use with Arduino Uno\" \/>\n<meta property=\"og:description\" content=\"We will measure and setup a photo resistor (LDR) for use in the Arduino processor. An LED will energize when dark, and shut off under light.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/\" \/>\n<meta property=\"og:site_name\" content=\"Bryce Automation\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ricky.bryce.7\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-02T19:07:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-26T00:52:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ricky-e1509649561444.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ricky\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/\"},\"author\":{\"name\":\"Ricky\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"headline\":\"Photo Resistor (LDR)\",\"datePublished\":\"2017-11-02T19:07:38+00:00\",\"dateModified\":\"2021-08-26T00:52:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/\"},\"wordCount\":549,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/ricky-e1509649561444.jpg\",\"keywords\":[\"Arduino\",\"LDR\",\"Photoresistor\"],\"articleSection\":[\"Arduino and other microprocessors\",\"Intermediate\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/\",\"name\":\"Photo Resistor Setup and Configuration for use with Arduino Uno\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/ricky-e1509649561444.jpg\",\"datePublished\":\"2017-11-02T19:07:38+00:00\",\"dateModified\":\"2021-08-26T00:52:14+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\"},\"description\":\"We will measure and setup a photo resistor (LDR) for use in the Arduino processor. An LED will energize when dark, and shut off under light.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/ricky-e1509649561444.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/ricky-e1509649561444.jpg\",\"width\":750,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/2017\\\/11\\\/02\\\/photo-resistor\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bryceautomation.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Photo Resistor (LDR)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#website\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/\",\"name\":\"Bryce Automation\",\"description\":\"Automating Home and Industry...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bryceautomation.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/#\\\/schema\\\/person\\\/5d5b0f6f6ad768f1ee52968338e63af7\",\"name\":\"Ricky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"url\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"contentUrl\":\"https:\\\/\\\/bryceautomation.com\\\/wp-content\\\/wphb-cache\\\/gravatar\\\/a8f\\\/a8fe6bf79d292b388ffee281ccb12488x96.jpg\",\"caption\":\"Ricky\"},\"sameAs\":[\"http:\\\/\\\/bryceautomation.com\",\"https:\\\/\\\/www.facebook.com\\\/ricky.bryce.7\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/ricky-bryce-4367a416\\\/\"],\"url\":\"https:\\\/\\\/bryceautomation.com\\\/index.php\\\/author\\\/ricky\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Photo Resistor Setup and Configuration for use with Arduino Uno","description":"We will measure and setup a photo resistor (LDR) for use in the Arduino processor. An LED will energize when dark, and shut off under light.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/","og_locale":"en_US","og_type":"article","og_title":"Photo Resistor Setup and Configuration for use with Arduino Uno","og_description":"We will measure and setup a photo resistor (LDR) for use in the Arduino processor. An LED will energize when dark, and shut off under light.","og_url":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/","og_site_name":"Bryce Automation","article_author":"https:\/\/www.facebook.com\/ricky.bryce.7","article_published_time":"2017-11-02T19:07:38+00:00","article_modified_time":"2021-08-26T00:52:14+00:00","og_image":[{"width":750,"height":1000,"url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ricky-e1509649561444.jpg","type":"image\/jpeg"}],"author":"Ricky","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#article","isPartOf":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/"},"author":{"name":"Ricky","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"headline":"Photo Resistor (LDR)","datePublished":"2017-11-02T19:07:38+00:00","dateModified":"2021-08-26T00:52:14+00:00","mainEntityOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/"},"wordCount":549,"commentCount":0,"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ricky-e1509649561444.jpg","keywords":["Arduino","LDR","Photoresistor"],"articleSection":["Arduino and other microprocessors","Intermediate"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/","url":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/","name":"Photo Resistor Setup and Configuration for use with Arduino Uno","isPartOf":{"@id":"https:\/\/bryceautomation.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#primaryimage"},"image":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#primaryimage"},"thumbnailUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ricky-e1509649561444.jpg","datePublished":"2017-11-02T19:07:38+00:00","dateModified":"2021-08-26T00:52:14+00:00","author":{"@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7"},"description":"We will measure and setup a photo resistor (LDR) for use in the Arduino processor. An LED will energize when dark, and shut off under light.","breadcrumb":{"@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#primaryimage","url":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ricky-e1509649561444.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/uploads\/2017\/11\/ricky-e1509649561444.jpg","width":750,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/bryceautomation.com\/index.php\/2017\/11\/02\/photo-resistor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bryceautomation.com\/"},{"@type":"ListItem","position":2,"name":"Photo Resistor (LDR)"}]},{"@type":"WebSite","@id":"https:\/\/bryceautomation.com\/#website","url":"https:\/\/bryceautomation.com\/","name":"Bryce Automation","description":"Automating Home and Industry...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bryceautomation.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bryceautomation.com\/#\/schema\/person\/5d5b0f6f6ad768f1ee52968338e63af7","name":"Ricky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","url":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","contentUrl":"https:\/\/bryceautomation.com\/wp-content\/wphb-cache\/gravatar\/a8f\/a8fe6bf79d292b388ffee281ccb12488x96.jpg","caption":"Ricky"},"sameAs":["http:\/\/bryceautomation.com","https:\/\/www.facebook.com\/ricky.bryce.7","https:\/\/www.linkedin.com\/in\/ricky-bryce-4367a416\/"],"url":"https:\/\/bryceautomation.com\/index.php\/author\/ricky\/"}]}},"_links":{"self":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/1327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/comments?post=1327"}],"version-history":[{"count":0,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/posts\/1327\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media\/1336"}],"wp:attachment":[{"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/media?parent=1327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/categories?post=1327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bryceautomation.com\/index.php\/wp-json\/wp\/v2\/tags?post=1327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}