{"id":101,"date":"2014-12-28T17:09:54","date_gmt":"2014-12-28T17:09:54","guid":{"rendered":"http:\/\/www.donluc.com\/?p=101"},"modified":"2014-12-28T17:09:54","modified_gmt":"2014-12-28T17:09:54","slug":"project-2-lens-led-mk2","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=101","title":{"rendered":"Project #2 &#8211; Lens &#8211; LED &#8211; Mk2"},"content":{"rendered":"<p><a href=\"http:\/\/iframewidth=640height=480src=\/\/www.youtube.com\/embed\/b0OoJTrV2iw?feature=player_embeddedframeborder=0allowfullscreen\/iframe\"><iframe loading=\"lazy\" width=\"640\" height=\"480\" src=\"\/\/www.youtube.com\/embed\/b0OoJTrV2iw?feature=player_embedded\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/a><\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2014\/12\/LensLEDMk2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-109\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2014\/12\/LensLEDMk2.jpg\" alt=\"LensLEDMk2\" width=\"640\" height=\"480\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2014\/12\/LensLEDMk2.jpg 640w, https:\/\/www.donluc.com\/wp-content\/uploads\/2014\/12\/LensLEDMk2-300x225.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>1 X Arduino UNO Rev3<\/p>\n<p>1 X Cable<\/p>\n<p>1 X Project #2 &#8211; Lens &#8211; LED &#8211; Mk1<\/p>\n<p>LensLEDMk2.1.ino<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"default\" data-enlighter-title=\"\">\/\/ ***** Don Luc *****\r\n\/\/ Software Version Information\r\n\/\/ 2.1\r\n\r\n#include &lt;Adafruit_NeoPixel.h&gt;\r\n\r\n\/\/ Which pin on the Arduino is connected to the NeoPixels?\r\n#define PIN            6\r\n\r\n\/\/ How many NeoPixels are attached to the Arduino?\r\n#define NUMPIXELS      2\r\n\r\nAdafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);\r\n\r\nint delayval = 500; \/\/ delay for half a second\r\n\r\nvoid loop() {\r\n\r\n  for(int i=0;i&lt;NUMPIXELS;i++){\r\n    \/\/ pixels.Color takes RGB values, from 0,0,0 up to 255,255,255\r\n    pixels.setBrightness(125);\r\n    pixels.setPixelColor(i, pixels.Color(50,150,50)); \/\/ Moderately bright green color.\r\n    pixels.show(); \/\/ This sends the updated pixel color to the hardware.\r\n    delay(delayval); \/\/ Delay for a period of time (in milliseconds).\r\n    \r\n  }\r\n}<\/pre>\n<p>setup.ino<\/p>\n<pre class=\"\">void setup() {\r\n  pixels.begin(); \/\/ This initializes the NeoPixel library.\r\n}\r\n<\/pre>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 X Arduino UNO Rev3 1 X Cable 1 X Project #2 &#8211; Lens &#8211; LED &#8211; Mk1 LensLEDMk2.1.ino \/\/ ***** Don Luc ***** \/\/ Software Version Information \/\/ 2.1 #include &lt;Adafruit_NeoPixel.h&gt; \/\/ Which pin on the Arduino is connected to the NeoPixels? #define PIN 6 \/\/ How many NeoPixels are attached to the Arduino? &#8230; <a title=\"Project #2 &#8211; Lens &#8211; LED &#8211; Mk2\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=101\" aria-label=\"Read more about Project #2 &#8211; Lens &#8211; LED &#8211; Mk2\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,50,5,10],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-glasses-led","category-arduino","category-microcontrollers","category-projects"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=101"}],"version-history":[{"count":6,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/101\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}