{"id":4587,"date":"2014-10-17T23:32:48","date_gmt":"2014-10-17T22:32:48","guid":{"rendered":"http:\/\/www.markwilson.co.uk\/blog\/?p=4587"},"modified":"2017-01-31T20:43:50","modified_gmt":"2017-01-31T20:43:50","slug":"ethernet-control-for-my-office-traffic-lights","status":"publish","type":"post","link":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm","title":{"rendered":"Ethernet control for my office &#8220;traffic lights&#8221;"},"content":{"rendered":"<p>A couple of years ago, I wrote about <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2012\/07\/traffic-lights-for-my-home-office.htm\">the &#8220;traffic lights&#8221; I&#8217;d created for my home office<\/a> (<a href=\"https:\/\/www.markwilson.co.uk\/blog\/2012\/08\/upgraded-the-traffic-lights-in-my-office-already.htm\">and subsequent &#8220;upgrade&#8221;<\/a>). Shortly after that, I updated the solution to use three LEDs (as shown below) but it still wasn&#8217;t quite what I needed. Walking to the door to push a button and change the light defeated the object somewhat. \u00a0I needed to enable this device with a &#8220;web service&#8221;!<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Red\/yellow\/green LEDs with pushbutton and Ethernet control\" src=\"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png?resize=358%2C441&#038;ssl=1\" alt=\"\" width=\"358\" height=\"441\" \/><\/p>\n<p>The solution comes\u00a0in the form of an <a href=\"http:\/\/arduino.cc\/en\/Main\/ArduinoEthernetShield\">Arduino Ethernet Shield<\/a>, allowing <a href=\"http:\/\/bildr.org\/2011\/06\/arduino-ethernet-pin-control\/\">pin control over a standard\u00a0Ethernet connection<\/a>. \u00a0I didn&#8217;t use the official shield\u00a0though &#8211;\u00a0<a href=\"http:\/\/www.ebay.co.uk\/itm\/Ethernet-Shield-W5100-For-Arduino-2009-UNO-Mega-1280-2560-\/300695278167?\">cheap imports can be found on eBay for around \u00a37<\/a>. \u00a0Following that, I amended my code using the <a href=\"http:\/\/www.instructables.com\/id\/Arduino-Ethernet-Shield-Tutorial\/?ALLSTEPS#\">Instructables Arduino Ethernet Shield Tutorial<\/a>\u00a0and another <a href=\"http:\/\/www.instructables.com\/id\/Control-an-LED-over-the-internet-using-the-Arduino\/\">Instructables post on controlling an LED over the Internet using an Arduino<\/a>.<\/p>\n<p>The end result is below (or <a href=\"https:\/\/gist.github.com\/3220401\">on Github<\/a>) &#8211; and the Arduino uses DHCP to obtain an IP address (reservations can be used to control which one &#8211; or DHCP logs can be analysed) and a simple <a href=\"http:\/\/en.wikipedia.org\/wiki\/Query_string\">query string<\/a>\u00a0is read to set the light using:<\/p>\n<ul>\n<li>http:\/\/xxx.xxx.xxx.xxx\/?r for red.<\/li>\n<li>http:\/\/xxx.xxx.xxx.xxx\/?a for amber.<\/li>\n<li>http:\/\/xxx.xxx.xxx.xxx\/?g for green.<\/li>\n<\/ul>\n<p>Anything else fails back to red. \u00a0<\/p>\n<p><dirtycode:noclick>\/*<br \/>\nRed\/green LED indicator with pushbutton control<br \/>\nBased on http:\/\/www.makeuseof.com\/tag\/arduino-traffic-light-controller\/<\/p>\n<p>USE_GITHUB_USERNAME=mark-wilson<\/p>\n<p>*\/<\/p>\n<p>\/\/ Setup Ethernet Shield<br \/>\n#include &lt;SPI.h><br \/>\n#include &lt;Ethernet.h><br \/>\nboolean reading = false;<\/p>\n<p>\/\/ Enter a MAC address and IP address for your controller below.<br \/>\n\/\/ The IP details will be dependent on your local network (commented out if DHCP in use):<br \/>\nbyte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };<br \/>\n\/\/ byte ip[] = { 192, 168, 0, 112 }; \/\/Manual setup only<br \/>\n\/\/ byte gateway[] = { 192, 168, 0, 1 }; \/\/Manual setup only<br \/>\n\/\/ byte subnet[] = { 255, 255, 255, 0 }; \/\/Manual setup only<\/p>\n<p>\/\/ Initialize the Ethernet server library<br \/>\n\/\/ with the IP address and port you want to use<br \/>\n\/\/ (port 80 is default for HTTP):<br \/>\nEthernetServer server(80);<\/p>\n<p>\/\/ Pins for coloured LEDs<br \/>\nint red = 3;<br \/>\nint amber = 4;<br \/>\nint green = 5;<br \/>\nint light = 0;<\/p>\n<p>int button = 2; \/\/ Pushbutton on pin 2<br \/>\nint buttonValue = 0; \/\/ Button defaults to 0 (LOW)<\/p>\n<p>void setup(){<br \/>\n  Serial.begin(9600);<\/p>\n<p>\/\/ Set up pins with LEDs as output devices and switch for input<br \/>\n  \/\/ Pins 10,11,12 &amp; 13 are used by the Ethernet Shield<br \/>\n  pinMode(red,OUTPUT);<br \/>\n  pinMode(amber,OUTPUT);<br \/>\n  pinMode(green,OUTPUT);<br \/>\n  pinMode(button,INPUT);<\/p>\n<p>\/\/ start the Ethernet connection and the server:<br \/>\n  Ethernet.begin(mac);<br \/>\n  \/\/Ethernet.begin(mac, ip, gateway, subnet); \/\/for manual setup<\/p>\n<p>server.begin();<br \/>\n  Serial.println(Ethernet.localIP());<br \/>\n}<\/p>\n<p>void loop(){<\/p>\n<p>\/\/ listen for incoming clients, and process qequest.<br \/>\n  checkForClient();<\/p>\n<p>\/\/ Read the value of the pushbutton switch<br \/>\n  buttonValue = digitalRead(button);<br \/>\n  if (buttonValue == HIGH){<br \/>\n    changeLights();<br \/>\n    delay(1000); \/\/ Wait 1 second before reading again<br \/>\n  }<br \/>\n}<\/p>\n<p>void changeLights(){<br \/>\n  \/\/ Change the lights based on current value: 0 is not set; 1 is red; 2 is amber; 3 is green<br \/>\n  switch (light) {<br \/>\n    case 1:<br \/>\n      turnLightAmber();<br \/>\n      break;<br \/>\n    case 2:<br \/>\n      turnLightGreen();<br \/>\n      break;<br \/>\n    case 3:<br \/>\n      turnLightRed();<br \/>\n    default:<br \/>\n      turnLightRed();<br \/>\n  }<br \/>\n}<\/p>\n<p>void turnLightGreen(){<br \/>\n  \/\/ Turn off the red\/amber and turn on the green<br \/>\n  digitalWrite(red,LOW);<br \/>\n  digitalWrite(amber,LOW);<br \/>\n  digitalWrite(green,HIGH);<br \/>\n  light = 3;<br \/>\n}<\/p>\n<p>void turnLightAmber(){<br \/>\n  \/\/ Turn off the green\/amber and turn on the red<br \/>\n  digitalWrite(green,LOW);<br \/>\n  digitalWrite(amber,HIGH);<br \/>\n  digitalWrite(red,LOW);<br \/>\n  light = 2;<br \/>\n}<\/p>\n<p>void turnLightRed(){<br \/>\n  \/\/ Turn off the green\/amber and turn on the red<br \/>\n  digitalWrite(green,LOW);<br \/>\n  digitalWrite(amber,LOW);<br \/>\n  digitalWrite(red,HIGH);<br \/>\n  light = 1;<br \/>\n}<\/p>\n<p>void checkForClient(){<\/p>\n<p>EthernetClient client = server.available();<\/p>\n<p>if (client) {<\/p>\n<pre><code>\/\/ An http request ends with a blank line\nboolean currentLineIsBlank = true;\nboolean sentHeader = false;\n\nwhile (client.connected()) {\n  if (client.available()) {\n\n    if(!sentHeader){\n      \/\/ Send a standard http response header\n      client.println(\"HTTP\/1.1 200 OK\");\n      client.println(\"Content-Type: text\/html\");\n      client.println();\n      sentHeader = true;\n    }\n\n    char c = client.read();\n\n    if(reading &amp;&amp; c == ' ') reading = false;\n    if(c == '?') reading = true; \/\/found the ?, begin reading the info\n\n    if(reading){\n      Serial.print(c);\n\n       switch (c) {\n         case 'a':\n           turnLightAmber();\n           break;\n         case 'g':\n           turnLightGreen();\n           break;\n         case 'r':\n           turnLightRed();\n           break;\n       }\n    }\n\n    if (c == '\\n' &amp;&amp; currentLineIsBlank)  break;\n\n    if (c == '\\n') {\n      currentLineIsBlank = true;\n    }else if (c != '\\r') {\n      currentLineIsBlank = false;\n    }\n\n  }\n}\n\ndelay(1); \/\/ give the web browser time to receive the data\nclient.stop(); \/\/ close the connection:\n<\/code><\/pre>\n<p>}<\/p>\n<p>}<\/dirtycode><\/p>\n<p>All it needs now is another service to read my Lync status and call the Arduino accordingly, although, having got this far, I have to admit the form factor is not exactly brilliant and I probably should spend the money on a <a href=\"http:\/\/www.busylight.com\/busylight-lync.html\">Busylight<\/a> or a <a href=\"http:\/\/www.blynclight.com\/\">Blynclight<\/a>\u00a0instead so\u00a0that\u00a0my Arduino can be repurposed for a new project!<\/p>\n<p>Or, of course, there&#8217;s Garry Martin (<a href=\"http:\/\/twitter.com\/garrymartin\">@GarryMartin<\/a>)&#8217;s beautifully simple approach:<\/p>\n<blockquote class=\"twitter-tweet\" lang=\"en\"><p><a href=\"https:\/\/twitter.com\/markwilsonit\">@markwilsonit<\/a> Ultra low-cost; connect 240V bulbs to light circuit and use three gang light switch&#8230; <a href=\"http:\/\/t.co\/Q6twiDDIOM\">pic.twitter.com\/Q6twiDDIOM<\/a><\/p>\n<p>\u2014 Garry Martin (@GarryMartin) <a href=\"https:\/\/twitter.com\/GarryMartin\/status\/523229909385478144\">October 17, 2014<\/a><\/p><\/blockquote>\n<p><script src=\"\/\/platform.twitter.com\/widgets.js\" async=\"\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A couple of years ago, I wrote about the &#8220;traffic lights&#8221; I&#8217;d created for my home office (and subsequent &#8220;upgrade&#8221;). Shortly after that, I updated the solution to use three LEDs (as shown below) but it still wasn&#8217;t quite what I needed. Walking to the door to push a button and change the light defeated &hellip; <a href=\"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Ethernet control for my office &#8220;traffic lights&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[218],"tags":[369,425],"class_list":["post-4587","post","type-post","status-publish","format-standard","hentry","category-technology","tag-arduino","tag-electronics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ethernet control for my office &quot;traffic lights&quot; - markwilson.it<\/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.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ethernet control for my office &quot;traffic lights&quot; - markwilson.it\" \/>\n<meta property=\"og:description\" content=\"A couple of years ago, I wrote about the &#8220;traffic lights&#8221; I&#8217;d created for my home office (and subsequent &#8220;upgrade&#8221;). Shortly after that, I updated the solution to use three LEDs (as shown below) but it still wasn&#8217;t quite what I needed. Walking to the door to push a button and change the light defeated &hellip; Continue reading Ethernet control for my office &#8220;traffic lights&#8221;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm\" \/>\n<meta property=\"og:site_name\" content=\"markwilson.it\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-17T22:32:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-31T20:43:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png\" \/>\n<meta name=\"author\" content=\"Mark Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:site\" content=\"@markwilsonit\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm\"},\"author\":{\"name\":\"Mark Wilson\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"headline\":\"Ethernet control for my office &#8220;traffic lights&#8221;\",\"datePublished\":\"2014-10-17T22:32:48+00:00\",\"dateModified\":\"2017-01-31T20:43:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm\"},\"wordCount\":634,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"image\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/basic-red-yellow-green-led-button-ethernet.png\",\"keywords\":[\"Arduino\",\"Electronics\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm\",\"name\":\"Ethernet control for my office \\\"traffic lights\\\" - markwilson.it\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/basic-red-yellow-green-led-button-ethernet.png\",\"datePublished\":\"2014-10-17T22:32:48+00:00\",\"dateModified\":\"2017-01-31T20:43:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/basic-red-yellow-green-led-button-ethernet.png\",\"contentUrl\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/images\\\/basic-red-yellow-green-led-button-ethernet.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/2014\\\/10\\\/ethernet-control-for-my-office-traffic-lights.htm#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ethernet control for my office &#8220;traffic lights&#8221;\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/\",\"name\":\"markwilson.it\",\"description\":\"get-info -class technology | write-output &gt; \\\/dev\\\/web\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/98f61365e7c39d6be942174b8c4de468\",\"name\":\"Mark Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\",\"width\":800,\"height\":800,\"caption\":\"Mark Wilson\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/www.markwilson.co.uk\\\/blog\\\/uploads\\\/image-4.png?fit=800%2C800&ssl=1\"},\"description\":\"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.\",\"sameAs\":[\"http:\\\/\\\/www.markwilson.co.uk\\\/\",\"https:\\\/\\\/www.instagram.com\\\/markwilsonuk\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/markawilson\\\/\",\"https:\\\/\\\/x.com\\\/markwilsonit\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCWHlZCoHRTocdvtrOJ2IL4A\"],\"url\":\"https:\\\/\\\/www.markwilson.co.uk\\\/blog\\\/author\\\/mark-wilson\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ethernet control for my office \"traffic lights\" - markwilson.it","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.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm","og_locale":"en_GB","og_type":"article","og_title":"Ethernet control for my office \"traffic lights\" - markwilson.it","og_description":"A couple of years ago, I wrote about the &#8220;traffic lights&#8221; I&#8217;d created for my home office (and subsequent &#8220;upgrade&#8221;). Shortly after that, I updated the solution to use three LEDs (as shown below) but it still wasn&#8217;t quite what I needed. Walking to the door to push a button and change the light defeated &hellip; Continue reading Ethernet control for my office &#8220;traffic lights&#8221;","og_url":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm","og_site_name":"markwilson.it","article_published_time":"2014-10-17T22:32:48+00:00","article_modified_time":"2017-01-31T20:43:50+00:00","og_image":[{"url":"https:\/\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png","type":"","width":"","height":""}],"author":"Mark Wilson","twitter_card":"summary_large_image","twitter_creator":"@markwilsonit","twitter_site":"@markwilsonit","twitter_misc":{"Written by":"Mark Wilson","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#article","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm"},"author":{"name":"Mark Wilson","@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"headline":"Ethernet control for my office &#8220;traffic lights&#8221;","datePublished":"2014-10-17T22:32:48+00:00","dateModified":"2017-01-31T20:43:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm"},"wordCount":634,"commentCount":1,"publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"image":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage"},"thumbnailUrl":"https:\/\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png","keywords":["Arduino","Electronics"],"articleSection":["Technology"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm","url":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm","name":"Ethernet control for my office \"traffic lights\" - markwilson.it","isPartOf":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage"},"image":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage"},"thumbnailUrl":"https:\/\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png","datePublished":"2014-10-17T22:32:48+00:00","dateModified":"2017-01-31T20:43:50+00:00","breadcrumb":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#primaryimage","url":"https:\/\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png","contentUrl":"https:\/\/www.markwilson.co.uk\/blog\/images\/basic-red-yellow-green-led-button-ethernet.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.markwilson.co.uk\/blog\/2014\/10\/ethernet-control-for-my-office-traffic-lights.htm#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.markwilson.co.uk\/blog"},{"@type":"ListItem","position":2,"name":"Ethernet control for my office &#8220;traffic lights&#8221;"}]},{"@type":"WebSite","@id":"https:\/\/www.markwilson.co.uk\/blog\/#website","url":"https:\/\/www.markwilson.co.uk\/blog\/","name":"markwilson.it","description":"get-info -class technology | write-output &gt; \/dev\/web","publisher":{"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.markwilson.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.markwilson.co.uk\/blog\/#\/schema\/person\/98f61365e7c39d6be942174b8c4de468","name":"Mark Wilson","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","url":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1","width":800,"height":800,"caption":"Mark Wilson"},"logo":{"@id":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/uploads\/image-4.png?fit=800%2C800&ssl=1"},"description":"A Chartered IT Professional, with recent experience in technology leadership, IT strategy and practice management roles, Mark Wilson is an Enterprise Architect in the Advisory and Management Group at risual. During a career spanning more than two decades, Mark has gained widespread recognition as an expert in his field including both industry and national press exposure. In addition to certifications from Microsoft, VMware, Red Hat, The Open Group and Axelos, Mark held a Microsoft Most Valuable Professional (MVP) award for three years and is now part of the MVP Reconnect programme. Mark is also well-known on social media and maintains an award-winning blog.","sameAs":["http:\/\/www.markwilson.co.uk\/","https:\/\/www.instagram.com\/markwilsonuk\/","https:\/\/www.linkedin.com\/in\/markawilson\/","https:\/\/x.com\/markwilsonit","https:\/\/www.youtube.com\/channel\/UCWHlZCoHRTocdvtrOJ2IL4A"],"url":"https:\/\/www.markwilson.co.uk\/blog\/author\/mark-wilson"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":4200,"url":"https:\/\/www.markwilson.co.uk\/blog\/2012\/08\/upgraded-the-traffic-lights-in-my-office-already.htm","url_meta":{"origin":4587,"position":0},"title":"Upgraded the &#8220;traffic lights&#8221; in my office already","author":"Mark Wilson","date":"Wednesday 1 August 2012","format":false,"excerpt":"Last night I wrote a blog post about the \"traffic lights\" for my office. The trouble with the original setup was that the light was set to a particular state until I edited the code and uploaded a new version to the Arduino. I was so excited about having something\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4189,"url":"https:\/\/www.markwilson.co.uk\/blog\/2012\/07\/traffic-lights-for-my-home-office.htm","url_meta":{"origin":4587,"position":1},"title":"&#8220;Traffic lights&#8221; for my home office","author":"Mark Wilson","date":"Tuesday 31 July 2012","format":false,"excerpt":"It's the school holidays, which means that working from home can be a little... noisy... at times. \u00a0Earlier today I saw a blog post from Scott Hanselman where he had hooked a light up to his instant messenger status to tell his family when he was on a call, or\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4834,"url":"https:\/\/www.markwilson.co.uk\/blog\/2013\/03\/homeplug-ethernet-part-2.htm","url_meta":{"origin":4587,"position":2},"title":"HomePlug Ethernet, part 2","author":"Mark Wilson","date":"Wednesday 20 March 2013","format":false,"excerpt":"For the last week or so, our living room has been out of bounds as we installed a new fireplace, redecorated and are now getting a new carpet fitted. That means all of the\u00a0furniture\u00a0has moved out to another room - and that includes our Smart TV. After months of near-perfect\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.markwilson.co.uk\/blog\/topic\/technology"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.markwilson.co.uk\/blog\/images\/power-ethernet-in-wall.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":689,"url":"https:\/\/www.markwilson.co.uk\/blog\/2006\/05\/creating-rj45-ethernet-loopback-cable.htm","url_meta":{"origin":4587,"position":3},"title":"Creating an RJ45  Ethernet loopback cable","author":"Mark Wilson","date":"Friday 19 May 2006","format":false,"excerpt":"Sometimes it's handy to make a PC think that it is connected to a network, even if there isn't one physically present (e.g. in a test environment where not all services are replicated). This is quite easy to achieve, with an RJ45 Ethernet loopback cable. By using 6\" lengths of\u2026","rel":"","context":"In \"Networking hardware\"","block_context":{"text":"Networking hardware","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/networking-hardware"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":744,"url":"https:\/\/www.markwilson.co.uk\/blog\/2007\/03\/be-careful-when-mixing-wireless-ethernet-devices.htm","url_meta":{"origin":4587,"position":4},"title":"Be careful when mixing wireless Ethernet devices","author":"Mark Wilson","date":"Thursday 15 March 2007","format":false,"excerpt":"It's well known that the proprietary extensions employed by some vendors to increase the speed\/range of their wireless Ethernet (IEEE 802.11) equipment can cause issues (and sometimes refuse to work with one another at all); however there is something else to consider when working with older wireless kit - the\u2026","rel":"","context":"In \"Networking hardware\"","block_context":{"text":"Networking hardware","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/networking-hardware"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":659,"url":"https:\/\/www.markwilson.co.uk\/blog\/2007\/01\/gigabit-ethernet-for-home-office.htm","url_meta":{"origin":4587,"position":5},"title":"Gigabit Ethernet for the home office","author":"Mark Wilson","date":"Thursday 11 January 2007","format":false,"excerpt":"Until now, my home office network has been centred around my NetGear ProSafe DS108 10\/100Mbps Ethernet hub attached to various computers, a D-Link DWL2000-AP+ wireless access point, a Solwise SAR 110 ADSL router and a downstream Gigabyte 5-port 10\/100Mbps switch (because my Mac refused to place nicely with the hub).\u2026","rel":"","context":"In \"Networking hardware\"","block_context":{"text":"Networking hardware","link":"https:\/\/www.markwilson.co.uk\/blog\/tag\/networking-hardware"},"img":{"alt_text":"","src":"http:\/\/www.assoc-amazon.co.uk\/e\/ir?t=marsweblo-21&l=ur2&o=2","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/4587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=4587"}],"version-history":[{"count":7,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/4587\/revisions"}],"predecessor-version":[{"id":6922,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/posts\/4587\/revisions\/6922"}],"wp:attachment":[{"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=4587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=4587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.markwilson.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=4587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}