{"id":5571,"date":"2024-05-09T00:08:18","date_gmt":"2024-05-09T00:08:18","guid":{"rendered":"https:\/\/rodmilstead.com\/pt\/?page_id=5571"},"modified":"2024-05-09T04:07:44","modified_gmt":"2024-05-09T04:07:44","slug":"arduino-color-sensor-and-rgb-led","status":"publish","type":"page","link":"https:\/\/rodmilstead.com\/pt\/arduino-color-sensor-and-rgb-led\/","title":{"rendered":"Arduino Color Sensor and RGB LED"},"content":{"rendered":"<p>This circuit and program will use the TCS34725 Color Sensor along with an RGB LED.<\/p>\n<p>By the time you are done, you will have a circuit that will detect a color and display that color (or something close to it) on the RGB LED.<\/p>\n<p><strong>Here&#8217;s the wiring diagram:<\/strong> add this to your RGB LED circuit.<br \/>\n<a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-08-at-8.53.16-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-5579 size-large\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-08-at-8.53.16-PM-854x1024.png\" alt=\"\" width=\"660\" height=\"791\" srcset=\"https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-08-at-8.53.16-PM-854x1024.png 854w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-08-at-8.53.16-PM-250x300.png 250w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-08-at-8.53.16-PM-768x921.png 768w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/Screenshot-2024-05-08-at-8.53.16-PM.png 1134w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/a><\/p>\n<p>Programming &#8211; you will need to setup the program and do something new &#8211; add a library.<\/p>\n<p><a href=\"https:\/\/docs.google.com\/document\/d\/192rUwMLMnnBktmPGdT8knLww1F6iXD3_54EJ2XDnK0E\/edit?usp=sharing\" target=\"_blank\" rel=\"noopener\">Click here for the program.<\/a><br \/>\nCopy\/paste this into an Arduino program.<\/p>\n<p>BEFORE you upload the program you need to add a library.\u00a0 It&#8217;s easy!<\/p>\n<figure id=\"attachment_5573\" aria-describedby=\"caption-attachment-5573\" style=\"width: 464px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/1_arduino_library.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5573 size-full\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/1_arduino_library.png\" alt=\"\" width=\"464\" height=\"163\" srcset=\"https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/1_arduino_library.png 464w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/1_arduino_library-300x105.png 300w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/a><figcaption id=\"caption-attachment-5573\" class=\"wp-caption-text\">Click on Tools and choose Manage Libraries.<\/figcaption><\/figure>\n<figure id=\"attachment_5574\" aria-describedby=\"caption-attachment-5574\" style=\"width: 277px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/2-arduinolibrary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5574 size-full\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/2-arduinolibrary.png\" alt=\"\" width=\"277\" height=\"293\" \/><\/a><figcaption id=\"caption-attachment-5574\" class=\"wp-caption-text\">Search for Adafruit TCS34725. Click the install button.<\/figcaption><\/figure>\n<figure id=\"attachment_5575\" aria-describedby=\"caption-attachment-5575\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/3_arduinolibrary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5575 size-full\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/3_arduinolibrary.png\" alt=\"\" width=\"580\" height=\"216\" srcset=\"https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/3_arduinolibrary.png 580w, https:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2024\/05\/3_arduinolibrary-300x112.png 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><figcaption id=\"caption-attachment-5575\" class=\"wp-caption-text\">Click the Install button. You are all set!<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Your Color Sensor and LED are alive!\u00a0 Hold an item up to the sensor and your RGB LED should change color to match that item&#8217;s color.<\/p>\n<p>Open serial monitor and note how the numbers change.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This circuit and program will use the TCS34725 Color Sensor along with an RGB LED. By the time you are done, you will have a circuit that will detect a color and display that color (or something close to it) on the RGB LED. Here&#8217;s the wiring diagram: add this to your RGB LED circuit. &hellip; <a href=\"https:\/\/rodmilstead.com\/pt\/arduino-color-sensor-and-rgb-led\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Arduino Color Sensor and RGB LED<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5571","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/5571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/comments?post=5571"}],"version-history":[{"count":6,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/5571\/revisions"}],"predecessor-version":[{"id":5586,"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/5571\/revisions\/5586"}],"wp:attachment":[{"href":"https:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/media?parent=5571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}