{"id":476,"date":"2010-12-01T15:16:25","date_gmt":"2010-12-01T15:16:25","guid":{"rendered":"http:\/\/www.kozeniauskas.com\/itblog\/?p=476"},"modified":"2011-02-11T11:42:09","modified_gmt":"2011-02-11T11:42:09","slug":"led-stair-lighting-based-on-arduino-part-1","status":"publish","type":"post","link":"https:\/\/www.kozeniauskas.com\/itblog\/2010\/12\/01\/led-stair-lighting-based-on-arduino-part-1\/","title":{"rendered":"LED stair lighting based on Arduino, Part 1"},"content":{"rendered":"<p>Hi Everyone,<br \/>\nThis post will be something different compared to the posts on this blog but it is still ralated to IT.<\/p>\n<p>About a year ago I&#8217;ve found out about Arduino and really liked what can be done with it and how easy it is to use. So I&#8217;ve bought it&#8230;. Well needles to say I played around with for day or 2 and forgot about it.<br \/>\nCouple months ago I saw Automatic LED stair lighting posted on YouTube see the video bellow:<br \/>\n<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"560\" height=\"391\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/Ir_cqS6oV5U?fs=1&amp;hl=en_GB\" \/><param name=\"allowfullscreen\" value=\"true\" \/><embed type=\"application\/x-shockwave-flash\" width=\"560\" height=\"391\" src=\"http:\/\/www.youtube.com\/v\/Ir_cqS6oV5U?fs=1&amp;hl=en_GB\" allowfullscreen=\"true\" allowscriptaccess=\"always\"><\/embed><\/object><br \/>\n<!--more--><br \/>\nThat looks nice isn&#8217;t it? I don&#8217;t need to light up my stairs but I know who has similar stairs and light already in place but they are using on\/off switch to turn them on and that means that they are left mostly on. The lights that are used in the setup are 8 halogen 12 Volt, 10Watt bulbs which if left on all day long can generate a fair amount on a monthly electricity bill.<br \/>\nSo decided to use my Arduino for this first project.<\/p>\n<p>Here are the parts that I will use for my draft:<br \/>\nArduino Duemilanove based on ATmega328<br \/>\n2x Infrared sensors<br \/>\nLight sensor<br \/>\n8x Leds<br \/>\nBreadboard<br \/>\nsome cables and resistors.<br \/>\nLater the Leds will be replaced with proper 12volt Leds<\/p>\n<p>After about an hour I had the following:<br \/>\n<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"560\" height=\"393\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/4Z9MiFEByr8?fs=1&amp;hl=en_GB\" \/><param name=\"allowfullscreen\" value=\"true\" \/><embed type=\"application\/x-shockwave-flash\" width=\"560\" height=\"393\" src=\"http:\/\/www.youtube.com\/v\/4Z9MiFEByr8?fs=1&amp;hl=en_GB\" allowfullscreen=\"true\" allowscriptaccess=\"always\"><\/embed><\/object><\/p>\n<p>Basically I&#8217;ve connected all Leds and one infrared sensor and wrote some code witch lights up all Leds one by one when IR sensor is triggered and after some inteval switches them off one by one. I use PWM so Leds dim instead of just switch on\/off.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi Everyone, This post will be something different compared to the posts on this blog but it is still ralated to IT. About a year ago I&#8217;ve found out about Arduino and really liked what can be done with it and how easy it is to use. So I&#8217;ve bought it&#8230;. Well needles to say [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[345],"tags":[347,348],"_links":{"self":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/476"}],"collection":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/comments?post=476"}],"version-history":[{"count":10,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/476\/revisions"}],"predecessor-version":[{"id":480,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/476\/revisions\/480"}],"wp:attachment":[{"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/media?parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/categories?post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/tags?post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}