{"id":10703,"date":"2015-01-06T16:59:59","date_gmt":"2015-01-06T08:59:59","guid":{"rendered":"http:\/\/www.seeedstudio.com\/blog\/?p=10703"},"modified":"2015-01-06T16:59:59","modified_gmt":"2015-01-06T08:59:59","slug":"my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/","title":{"rendered":"My holiday project: Internet-controlled lights using different flavors of Arduino."},"content":{"rendered":"<p><strong>By\u00a0Francesco Truzzi<\/strong><\/p>\n<p>Brace yourselves, Christmas is coming.<\/p>\n<p>Even though it\u2019s been a while since I\u2019ve last felt the magic atmosphere of Christmas, this year I want to celebrate it in a quite different\u00a0way.<\/p>\n<p>In the era of IoT,\u00a0I\u2019m building some internet-controllable lights\u00a0using all the Arduinos I have.<\/p>\n<p>The main point is that there will be different \u201clight clients\u201d which are Arduino that can be connected to different light sources such as\u00a0analog LED strips, 3\/10W RGB LEDs\u00a0(my custom driver might come in handy!) and WS2812B addressable strips (provided that they come in time).<\/p>\n<p>Each of these devices can\u00a0receive commands over TCP. This means that they can be controlled from any internet-connected device. I am building a \u201ccontroller box\u201d which will have some\u00a0analog controls\u00a0and can choose which light client to connect to, and control it through user input (sticks and pots, yay!) and will also\u00a0host a web interface.<\/p>\n<p>Available lighting modes will be:\u00a0manual\u00a0mode,\u00a0fade\u00a0mode (single or from one color to another),random\u00a0mode,\u00a0strobe\u00a0mode. I might add some photo\/sound sensors if I have time.<\/p>\n<p>Here\u2019s a bad\u00a0sketch of the whole project, originally drawn for the element14 forums:<\/p>\n<figure id=\"attachment_248\"><a href=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310.jpg\" rel=\"lightbox[242]\"><img fetchpriority=\"high\" decoding=\"async\" alt=\"A sketch of my project\" src=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg\" width=\"489\" height=\"367\" \/><\/a><figcaption>A sketch of my project<\/figcaption><\/figure>\n<p>I\u2019m now going to delve a bit more into my project, in order to explain things a bit better.<\/p>\n<h2>Hardware and components<\/h2>\n<h3>1. <a href=\"http:\/\/www.seeedstudio.com\/depot\/Arduino-Y%C3%9AN-p-1616.html?cPath=6_7\" target=\"_blank\">Arduino Y\u00f9n<\/a><\/h3>\n<figure><img decoding=\"async\" alt=\"\" src=\"http:\/\/i.imgur.com\/sMExUbo.jpg\" width=\"450\" height=\"300\" \/><figcaption>The Arduino Y\u00fan.<\/figcaption><\/figure>\n<p>Another big news is coming today.\u00a0I was selected by element14 to be one of the 20 contestants for their yearly Christmas DIY competition. They will provide me with an Arduino Y\u00f9n (yum, my mouth is watering already), an Arduino Uno and an Infineon RGB shield. \u00a0Actually all this stuff\u00a0arrived yesterday \u2013 I began to write\u00a0this post a few days ago.<\/p>\n<p>The big player here is definitely the Y\u00f9n. It has a Linux side which can be hacked quite extensively (Python? Javascript?) and provides internet connectivity, together with a real Atmega\/Arduino side. Obviously, the two can communicate over serial connection using the Bridge library.<\/p>\n<p>The Y\u00f9n will host the WebUI, which I already partially coded on rPi and, if the Atmega has enough memory and horsepower, will also\u00a0be the heart of the controller box\u00a0I already talked about.<\/p>\n<h3>2. <a href=\"http:\/\/www.seeedstudio.com\/depot\/LinkIt-ONE-p-2017.html?cPath=122_142\" target=\"_blank\">SeeedStudio\u2019s LinkIt ONE<\/a><\/h3>\n<figure><a href=\"http:\/\/i.imgur.com\/IMgyvaw.jpg\" rel=\"lightbox[242]\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/i.imgur.com\/IMgyvaw.jpg\" width=\"501\" height=\"308\" \/><\/a><figcaption>The <a href=\"http:\/\/www.seeedstudio.com\/depot\/LinkIt-ONE-p-2017.html?cPath=122_142\" target=\"_blank\">LinkIt ONE.<\/a><\/figcaption><\/figure>\n<p>As some of you may know, I\u2019ve recently gotten a LinkIt ONE from SeeedStudio and I\u2019m playing quite a lot with it.<\/p>\n<p>It\u2019s a pretty nice board: it provides lots of memory, processing power and connectivity options, for a relatively low price. It has its quirks though, such as no Linux\/Mac compatibility (I\u2019m talking about the SDK of course) and a small number of PWM outputs and analog inputs.<\/p>\n<p>However,\u00a0the Wi-Fi API is well done and connecting to wireless network is a breeze. Compared to an Arduino UNO + ESP8266 modules, it\u2019s day and night.<\/p>\n<p>This is why the LinkIt\u00a0will be one of the clients\u00a0in my project. I will probably connect it to some RGB strips as the guys over at Seeed were kind enough to provide me with an I2C LED strip driver which appears to be working well.<\/p>\n<h3>3. <a href=\"http:\/\/www.seeedstudio.com\/depot\/Arduino-Uno-Rev3-p-694.html?cPath=6_7\" target=\"_blank\">Arduino\u00a0Uno<\/a><\/h3>\n<figure><a href=\"http:\/\/i.imgur.com\/KjMpxPT.jpg\" rel=\"lightbox[242]\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/i.imgur.com\/KjMpxPT.jpg\" width=\"450\" height=\"296\" \/><\/a><figcaption>Do you really need a picture of this?<\/figcaption><\/figure>\n<p>The evergreen Arduino Uno will be one of the clients of my project.<\/p>\n<p>If possibile, it will be\u00a0connected to WS2812 strips (which could make a nice Christmas tree, but Italian post is so slow I am afraid they will arrive in February) or RGB strips.<\/p>\n<p>It will use an\u00a0ESP8266 for Wi-Fi connection. These tiny little modules are becoming very popular and can be hacked down to the core. In fact, I could develop my project using only the ESP8266 (it has a nice MCU and community support is growing) by coding bare C on it, but the time schedule is quite tight here.<\/p>\n<p>It could also be paired to the\u2026<\/p>\n<h3>4. Infineon RGB Lighting shield<\/h3>\n<figure><a href=\"http:\/\/i.imgur.com\/5xZ9cnEl.jpg\" rel=\"lightbox[242]\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/i.imgur.com\/5xZ9cnEl.jpg\" width=\"519\" height=\"310\" \/><\/a><figcaption>The Infineon RGB Lighting shield for Arduino.<\/figcaption><\/figure>\n<p>Another board from the kind people at element14, it\u2019s an Arduino shield that\u00a0controls analog RGB strips.<\/p>\n<p>It\u2019s powered by an XMC1202 microcontroller and has quite nice features such as 700mA current (with a peak of 1A!), wide (12-48V) input voltage,\u00a0brightness color control\u00a0and\u00a0I2C interface.<\/p>\n<p>I haven\u2019t tested it yet but it seems to have all the features you would need for analog strips.<\/p>\n<h3><del>5. Arduino Nano<\/del><\/h3>\n<p>I fried this yesterday. It\u2019s gone.\u00a0Dead, killed, kaputt. \u00a0It was one of by best friends but I didn\u2019t really pay attention and shorted it badly due to a messy bench and too many flying jumpers (no, it\u2019s not the diode nor the regulator). Luckily it was a clone and it cost no more than 3\u20ac.<\/p>\n<h3>5. The controller<\/h3>\n<figure id=\"attachment_249\"><a href=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141217_202633.jpg\" rel=\"lightbox[242]\"><img loading=\"lazy\" decoding=\"async\" alt=\"That's how it looks. Pretty alpha right?\" src=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141217_202633-1024x768.jpg\" width=\"648\" height=\"486\" \/><\/a><figcaption>That\u2019s how it looks. Pretty\u00a0<em>alpha<\/em>\u00a0right?<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>I hope to put it into a wooden box, but that\u2019s how it is right now. There are\u00a0three pots\u00a0for color-choosing, a\u00a02-axis joystick\u00a0with an\u00a0\u201center\u201d button, a\u00a0\u201cback\u201d button\u00a0(the tactile switch you see on the left) and an\u00a0I2C display\u00a0which looked way, way bigger on the website I bought it from. Too bad it\u2019s only 0.96\u2033: luckily it has\u00a0128\u00d764\u00a0pixels\u00a0and cool libraries are available.<\/p>\n<p>The thing is hooked up to the Y\u00fan and in development. Please ignore the leftover jumpers (side note: I started making them myself using AWG22 wire, my breadboards are much cleaner!)<\/p>\n<h2>Software<\/h2>\n<h3>1. Web Interface<\/h3>\n<p>This is more of a proof-of-concept and there is still a lot of work to do. It\u2019s written in Python (CherryPy as backend) and Javascript and is hosted on the linux-side of the Y\u00fan. It can connect to any of the lights so that you can control them as you want.<\/p>\n<figure id=\"attachment_254\"><a href=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/HaMCNHX.png\" rel=\"lightbox[242]\"><img loading=\"lazy\" decoding=\"async\" alt=\"WebUI screenshot.\" src=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/HaMCNHX-1024x523.png\" width=\"876\" height=\"446\" \/><\/a><figcaption>WebUI screenshot.<\/figcaption><\/figure>\n<p>It\u2019s pretty basic and I plan on adding more features. It\u2019s also my first experience with Javascript. On the upper right, there is a button you can use to choose which client to connect to: it turns green if the connection is successful, red otherwise.<\/p>\n<p>I found the color picker on Google and tweaked it a little bit: unfortunately, I don\u2019t remember who made\u00a0it as it was a few weeks ago.<\/p>\n<p>The Web Interface is sending commands in the following form, which will then be read by the Arduinos: MODE,R,G,B$. For example, if you want to set the orange color, the command would be \u201cM,255,128,0$\u201d, with \u2018$\u2019 as the terminating character. Example here.<\/p>\n<figure><a href=\"http:\/\/i.imgur.com\/UiZSV5b.png\" rel=\"lightbox[242]\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"http:\/\/i.imgur.com\/UiZSV5b.png\" width=\"567\" height=\"403\" \/><\/a><figcaption>Receiving commands from the\u00a0WebUI.<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>The \u2018F\u2019\u00a0stands for fade and the following numbers are the starting and ending values for each color. The last one, \u20185\u2019 in this case, is the delay between each fade step in milliseconds.<\/p>\n<p>\u2018S\u2019 is strobe mode, and \u2018100\u2019 is the delay between each color change in milliseconds.<\/p>\n<p>As you can see, the code is now opening a new connection for each command sent. This is quite bad practice, so I\u2019ll need to fix it.<\/p>\n<h3>2. Python server and\u00a0script (+ Arduino communication).<\/h3>\n<p>These are running on the Linux side of the Y\u00fan and they are called and started\u00a0by the setup() function in the Arduino sketch. There is a set of useful commands from the Bridge and Process classes which can be used to run Linux commands from the Arduino.<\/p>\n<p>In this case, I\u2019m using\u00a0<a href=\"http:\/\/arduino.cc\/en\/Reference\/YunProcessRunShellCommandAsynchronously\">runShellCommandAsynchronously()<\/a>\u00a0to start a non-blocking Python process (i.e. the Arduino sketches continues to run, without waiting for its completion).<\/p>\n<p>I\u2019m calling it twice, to run both the webUI\u00a0application and the script that connects to the various clients and sends the needed strings.<\/p>\n<p>Here\u2019s a preview of the file that sends commands to the various clients (again, I just wrote this and\u00a0I have to optimize it). It sends the string received from the Arduino\u00a0only if it\u2019s different from the previous one.<\/p>\n<div id=\"crayon-54aba225a6945240129851\">\n<div><\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td>\n<div>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<div>19<\/div>\n<div>20<\/div>\n<div>21<\/div>\n<div>22<\/div>\n<div>23<\/div>\n<div>24<\/div>\n<div>25<\/div>\n<div>26<\/div>\n<div>27<\/div>\n<div>28<\/div>\n<div>29<\/div>\n<div>30<\/div>\n<div>31<\/div>\n<div>32<\/div>\n<div>33<\/div>\n<\/div>\n<\/td>\n<td>\n<div>\n<div id=\"crayon-54aba225a6945240129851-1\">import socket<\/div>\n<div id=\"crayon-54aba225a6945240129851-2\">import string<\/div>\n<div id=\"crayon-54aba225a6945240129851-3\">import sys<\/div>\n<div id=\"crayon-54aba225a6945240129851-4\">sys.path.insert(0, &#8216;\/usr\/lib\/python2.7\/bridge\/&#8217;)<\/div>\n<div id=\"crayon-54aba225a6945240129851-5\">from bridgeclient import BridgeClient<\/div>\n<div id=\"crayon-54aba225a6945240129851-6\"><\/div>\n<div id=\"crayon-54aba225a6945240129851-7\">def send(host, port, command):<\/div>\n<div id=\"crayon-54aba225a6945240129851-8\">sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<\/div>\n<div id=\"crayon-54aba225a6945240129851-9\"><\/div>\n<div id=\"crayon-54aba225a6945240129851-10\">if(sock.connect_ex((host, port)) == 0): #if connection is successful<\/div>\n<div id=\"crayon-54aba225a6945240129851-11\">print (&#8220;Connected to %s:%d&#8221;) % (host, port)<\/div>\n<div id=\"crayon-54aba225a6945240129851-12\">print (&#8220;Sending command %s&#8221;) % command<\/div>\n<div id=\"crayon-54aba225a6945240129851-13\">sock.send(command) #send the string<\/div>\n<div id=\"crayon-54aba225a6945240129851-14\">sock.close() #and close the socket<\/div>\n<div id=\"crayon-54aba225a6945240129851-15\">return 0<\/div>\n<div id=\"crayon-54aba225a6945240129851-16\">else:<\/div>\n<div id=\"crayon-54aba225a6945240129851-17\">print (&#8220;Connection failed :(&#8220;)<\/div>\n<div id=\"crayon-54aba225a6945240129851-18\">return 1<\/div>\n<div id=\"crayon-54aba225a6945240129851-19\"><\/div>\n<div id=\"crayon-54aba225a6945240129851-20\">bridge = BridgeClient()<\/div>\n<div id=\"crayon-54aba225a6945240129851-21\">last_command = &#8220;0&#8221;<\/div>\n<div id=\"crayon-54aba225a6945240129851-22\"><\/div>\n<div id=\"crayon-54aba225a6945240129851-23\">while 1:<\/div>\n<div id=\"crayon-54aba225a6945240129851-24\">if(bridge.get(&#8220;status&#8221;) != &#8220;0&#8221;): #check if we need to update<\/div>\n<div id=\"crayon-54aba225a6945240129851-25\">IP = bridge.get(&#8220;IP&#8221;) #get the IP<\/div>\n<div id=\"crayon-54aba225a6945240129851-26\">port = int(bridge.get(&#8220;port&#8221;)) #get the port and convert it to an integer<\/div>\n<div id=\"crayon-54aba225a6945240129851-27\">command = bridge.get(&#8220;data&#8221;) #get the string we need to send<\/div>\n<div id=\"crayon-54aba225a6945240129851-28\">if(command != last_command): #if it&#8217;s different than the previous one&#8230;<\/div>\n<div id=\"crayon-54aba225a6945240129851-29\">if(send(IP, port, command) == 0): #&#8230;send it and check the result<\/div>\n<div id=\"crayon-54aba225a6945240129851-30\">last_command = command #the string we just sent becomes the last sent<\/div>\n<div id=\"crayon-54aba225a6945240129851-31\">bridge.put(&#8220;response&#8221;, &#8220;0&#8221;)<\/div>\n<div id=\"crayon-54aba225a6945240129851-32\">else:<\/div>\n<div id=\"crayon-54aba225a6945240129851-33\">bridge.put(&#8220;response&#8221;, &#8220;1&#8221;)<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>That\u2019s how it works: when you call the\u00a0Bridge.put(\u201cdestination\u201d, \u201cvalue\u201d)\u00a0function\u00a0in the Arduino sketch, it puts your value into a \u201cdestination\u201d variable. This value\u00a0can then be retrieved\u00a0from the Python script\u00a0after declaring a BridgeClient\u00a0object and using the commandbridge.get(\u201cdestination\u201d).<\/p>\n<p>I\u2019m not showing you any more code until I feel it\u2019s nearly complete, but everything will be open source. A video is also coming!<\/p>\n<p>Stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By\u00a0Francesco Truzzi Brace yourselves, Christmas is coming. Even though it\u2019s been a while since I\u2019ve<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10703","post","type-post","status-publish","format-standard","hentry","category-news"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>My holiday project: Internet-controlled lights using different flavors of Arduino. - Latest News from Seeed Studio<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"My holiday project: Internet-controlled lights using different flavors of Arduino. - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"By\u00a0Francesco Truzzi Brace yourselves, Christmas is coming. Even though it\u2019s been a while since I\u2019ve\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-06T08:59:59+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg\" \/>\n<meta name=\"author\" content=\"\u884c\u653f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u884c\u653f\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/\",\"name\":\"My holiday project: Internet-controlled lights using different flavors of Arduino. - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg\",\"datePublished\":\"2015-01-06T08:59:59+00:00\",\"dateModified\":\"2015-01-06T08:59:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/4a6f0df70e5aa1b470083e77a0919ba5\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#primaryimage\",\"url\":\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg\",\"contentUrl\":\"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"My holiday project: Internet-controlled lights using different flavors of Arduino.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/4a6f0df70e5aa1b470083e77a0919ba5\",\"name\":\"\u884c\u653f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4c87945076c1c9aea5570fea7739e112?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4c87945076c1c9aea5570fea7739e112?s=96&r=g\",\"caption\":\"\u884c\u653f\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"My holiday project: Internet-controlled lights using different flavors of Arduino. - Latest News from Seeed Studio","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/","og_locale":"en_US","og_type":"article","og_title":"My holiday project: Internet-controlled lights using different flavors of Arduino. - Latest News from Seeed Studio","og_description":"By\u00a0Francesco Truzzi Brace yourselves, Christmas is coming. Even though it\u2019s been a while since I\u2019ve","og_url":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2015-01-06T08:59:59+00:00","og_image":[{"url":"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg","type":"","width":"","height":""}],"author":"\u884c\u653f","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u884c\u653f","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/","url":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/","name":"My holiday project: Internet-controlled lights using different flavors of Arduino. - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#primaryimage"},"thumbnailUrl":"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg","datePublished":"2015-01-06T08:59:59+00:00","dateModified":"2015-01-06T08:59:59+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/4a6f0df70e5aa1b470083e77a0919ba5"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#primaryimage","url":"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg","contentUrl":"http:\/\/b.truzzi.me\/wp-content\/uploads\/2014\/12\/IMG_20141209_180310-1024x768.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2015\/01\/06\/my-holiday-project-internet-controlled-lights-using-different-flavors-of-arduino\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"My holiday project: Internet-controlled lights using different flavors of Arduino."}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/4a6f0df70e5aa1b470083e77a0919ba5","name":"\u884c\u653f","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4c87945076c1c9aea5570fea7739e112?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4c87945076c1c9aea5570fea7739e112?s=96&r=g","caption":"\u884c\u653f"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/admin\/"}]}},"modified_by":null,"views":6504,"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":"","visody_icon":"","magazine-7-slider-full":"","magazine-7-slider-center":"","magazine-7-featured":"","magazine-7-medium":"","magazine-7-medium-square":""},"author_info":{"display_name":"\u884c\u653f","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/admin\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"1","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/10703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=10703"}],"version-history":[{"count":3,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/10703\/revisions"}],"predecessor-version":[{"id":10706,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/10703\/revisions\/10706"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=10703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=10703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=10703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}