{"id":211,"date":"2015-10-21T16:07:40","date_gmt":"2015-10-21T16:07:40","guid":{"rendered":"http:\/\/www.aaronparsekian.com\/?p=211"},"modified":"2015-10-28T15:43:26","modified_gmt":"2015-10-28T15:43:26","slug":"rgb-proximity-candle","status":"publish","type":"post","link":"http:\/\/www.aaronparsekian.com\/?p=211","title":{"rendered":"RGB proximity candle"},"content":{"rendered":"<p>For the midterm Jarrett and I made an LED candle that is controlled with a proximity sensor. The proximity sensor controls the hue of the RGB led, and via serial over bluetooth it controls the volume of a sound file in p5.<\/p>\n<p>Here is an initial test:<\/p>\n<p><iframe loading=\"lazy\" title=\"IMG_1132\" src=\"https:\/\/player.vimeo.com\/video\/143881852?dnt=1&amp;app_id=122963\" width=\"660\" height=\"371\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" title=\"IMG_1143\" src=\"https:\/\/player.vimeo.com\/video\/143881496?dnt=1&amp;app_id=122963\" width=\"660\" height=\"371\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write\"><\/iframe><\/p>\n<p><a href=\"http:\/\/www.aaronparsekian.com\/wp-content\/uploads\/2015\/10\/IMG_1141.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-223\" src=\"http:\/\/www.aaronparsekian.com\/wp-content\/uploads\/2015\/10\/IMG_1141-300x225.jpg\" alt=\"IMG_1141\" width=\"300\" height=\"225\" srcset=\"http:\/\/www.aaronparsekian.com\/wp-content\/uploads\/2015\/10\/IMG_1141-300x225.jpg 300w, http:\/\/www.aaronparsekian.com\/wp-content\/uploads\/2015\/10\/IMG_1141-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Here is the code on the arduino:<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/aaronparsekian\/f79ec109f9da6a151624.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/aaronparsekian\/f79ec109f9da6a151624\">Gist<\/a>.<\/noscript><\/div>\n<p>The function that I used to convert\u00a0hue as one value to RGB is very elegant. It was written by Harley Pebley and can be found here:<a href=\"http:\/\/www.skylark-software.com\/2011\/01\/arduino-notebook-rgb-led-and-color_21.html\">\u00a0http:\/\/www.skylark-software.com\/2011\/01\/arduino-notebook-rgb-led-and-color_21.html<\/a><\/p>\n<p>And here is the p5 sketch used to control the sound via serial:<\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/aaronparsekian\/2bde05a7402b3847e69e.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/aaronparsekian\/2bde05a7402b3847e69e\">Gist<\/a>.<\/noscript><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the midterm Jarrett and I made an LED candle that is controlled with a proximity sensor. The proximity sensor controls the hue of the RGB led, and via serial over bluetooth it controls the volume of a sound file in p5. Here is an initial test: Here is the code on the arduino: View &hellip; <a href=\"http:\/\/www.aaronparsekian.com\/?p=211\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">RGB proximity candle<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,3],"tags":[],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-fall-2015","category-pcomp"],"_links":{"self":[{"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211"}],"version-history":[{"count":3,"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=\/wp\/v2\/posts\/211\/revisions"}],"predecessor-version":[{"id":225,"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=\/wp\/v2\/posts\/211\/revisions\/225"}],"wp:attachment":[{"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.aaronparsekian.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}