{"id":396,"date":"2011-09-06T20:40:26","date_gmt":"2011-09-06T18:40:26","guid":{"rendered":"http:\/\/tomashg.com\/?p=396"},"modified":"2012-04-10T17:06:12","modified_gmt":"2012-04-10T15:06:12","slug":"weather-lamp","status":"publish","type":"post","link":"https:\/\/tomashg.com\/?p=396","title":{"rendered":"Weather Lamp"},"content":{"rendered":"<p><object width=\"560\" height=\"345\"><param name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/8TgWpzq2nTo?version=3&amp;hl=en_US&amp;rel=0&amp;hd=1\" \/><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><embed type=\"application\/x-shockwave-flash\" width=\"560\" height=\"345\" src=\"http:\/\/www.youtube.com\/v\/8TgWpzq2nTo?version=3&amp;hl=en_US&amp;rel=0&amp;hd=1\" allowscriptaccess=\"always\" allowfullscreen=\"true\"><\/embed><\/object><\/p>\n<p>After obtaining my first <a title=\"Arduino\" href=\"http:\/\/arduino.cc\/\" target=\"_blank\">Arduino<\/a> prototyping\u00a0board I had to put it to some good use. By brainstorming, reading and drawing inspiration from various sources I came up with the idea of creating a weather desk lamp.\u00a0Basically\u00a0the idea is that it reads weather data from\u00a0RSS feeds like temperature, wind speed and precipitation and changes\u00a0accordingly\u00a0the color and intensity of the light. Also there are modes where you can manually set the RGB values or let it randomly swirl through colors.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/WeatherScreenshot.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium wp-image-415\" title=\"WeatherScreenshot\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/WeatherScreenshot-300x168.jpg\" alt=\"\" width=\"300\" height=\"168\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/WeatherScreenshot-300x168.jpg 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/WeatherScreenshot-1024x575.jpg 1024w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/WeatherScreenshot.jpg 1346w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For the task of obtaining and\u00a0analyzing the weather forecast I created a small <a title=\"Processing\" href=\"http:\/\/processing.org\/\" target=\"_blank\">Processing<\/a> program, \u00a0it \u00a0strips certain values from the RSS feed, maps them to RGB values and passes them over to the Arduino board.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00074.jpg\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-416\" title=\"DSC00074\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00074-300x300.jpg\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00074-300x300.jpg 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00074-150x150.jpg 150w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00074-1021x1024.jpg 1021w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>At first I tested the whole thing with three clear LEDs but the colors\u00a0did&#8217;t\u00a0mix up quite well. So I ordered some <a title=\"Clear 'Piranha' Super-flux RGB\" href=\"https:\/\/www.adafruit.com\/products\/314\" target=\"_blank\">Super-flux Piranha<\/a> RGB LEDs. Really bright little bugger! The only problem was that they are Common-Anode type, with Arduino it meant they had to be implemented in a sort of active-low way. I used <a title=\"Pulse Width Modulation\" href=\"http:\/\/www.arduino.cc\/en\/Tutorial\/PWM\" target=\"_blank\">PWM<\/a> to set the color intensity so I had to invert the output values in order for it to work properly again.<\/p>\n<p><a href=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00120.jpg\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-417\" title=\"DSC00120\" src=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00120-300x197.jpg\" alt=\"\" width=\"300\" height=\"197\" srcset=\"https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00120-300x197.jpg 300w, https:\/\/tomashg.com\/wp-content\/uploads\/2011\/09\/DSC00120-1024x673.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Finally after a lot of messing around I reached the desired effect and a nice smooth color swirl. So the next step was to make the whole thing a little bit more presentable, so here comes in IKEA. I went there for a walk looking for something that would &#8220;ring a bell&#8221;, after all I ended up getting a <a title=\"FODO Table Lamp\" href=\"http:\/\/www.ikea.com\/us\/en\/catalog\/products\/70096377\" target=\"_blank\">FODO Table lamp<\/a> to stick the whole thing inside!<\/p>\n<p>Source : <a href=\"\/weather_lamp.zip\">weather_lamp.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After obtaining my first Arduino prototyping\u00a0board I had to put it to some good use. By brainstorming, reading and drawing inspiration from various sources I came up with the idea of creating a weather desk lamp.\u00a0Basically\u00a0the idea is that it reads weather data from\u00a0RSS feeds like temperature, wind speed and precipitation and changes\u00a0accordingly\u00a0the color and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79,32],"tags":[80,84,85,76,82,83,81],"class_list":["post-396","post","type-post","status-publish","format-standard","hentry","category-arduino","category-technology","tag-arduino-2","tag-ikea","tag-led","tag-processing","tag-rss","tag-weather","tag-weather-lamp"],"_links":{"self":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts\/396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=396"}],"version-history":[{"count":13,"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/tomashg.com\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions\/423"}],"wp:attachment":[{"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomashg.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}