{"id":218,"date":"2015-12-18T00:01:00","date_gmt":"2015-12-17T22:01:00","guid":{"rendered":"http:\/\/iot.fkainka.de\/?p=218"},"modified":"2018-10-24T16:04:08","modified_gmt":"2018-10-24T15:04:08","slug":"day-18","status":"publish","type":"post","link":"https:\/\/iot.fkainka.de\/en\/day-18","title":{"rendered":"Day 18: Universal remote control"},"content":{"rendered":"<p>Yesterday, you built a receiver for infra-red remote controls. Today, you are building the remote control itself. More precisely, you will build a universal remote control that you can operate by computer or Smartphone and with which you can operate your TV or other devices whenever you misplace the original remote control.<\/p>\n<div id=\"attachment_220\" style=\"width: 626px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-1.jpg\"><img aria-describedby=\"caption-attachment-220\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-220\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-1-1024x500.jpg\" alt=\"Anschluss der IR-Diode an Pin D3\" width=\"616\" height=\"301\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-1-1024x500.jpg 1024w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-1-300x146.jpg 300w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-1-972x475.jpg 972w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-1.jpg 1106w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/a><p id=\"caption-attachment-220\" class=\"wp-caption-text\">The IR-diode at Pin D3<\/p><\/div>\n<p>For this project, you need the component behind today&#8217;s door: the IR diode. It looks like a simple LED, but it sends light in the invisible infra-red range. The IR-signals are visible to a digital camera, however. The structure of today&#8217;s experiment is shown in the figure. Don&#8217;t be surprised that the IR-LED is not given a dropping resistor. The effective dropping resistor is the On-resistor of the port, at approx. 30 Ohm. Because of this, the current through the diode is quite high, but the impulses sent are so short that the diode will not take damage.<\/p>\n<p><strong>The program:\u00a0<a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/11\/Day18_IrRemote.zip\">Day18_IrRemote<\/a><\/strong><\/p>\n<p>Before the program can work, you need to make some adjustments again. If you read out and used the codes for Power, Volume up, Volume down, Channel up, Channel down and Mute yesterday, you can simply enter these codes into the irCommand array in sequence. Otherwise, install yesterday&#8217;s programme again and read out the matching codes. Of course, you may use entirely different codes as well. The labels on the website will not match then. In addition to the codes, you also need to enter the protocol used in the variable irProtokoll if your remote control is supported. Last, you need to enter the length of the signal to be sent. Determine it by multiplying the digits of the hex code by four. Example: My code for Power was 0x20DF10EF. 0x is simply the sign for a hex code, which leaves 20DF10EF and thus an eight-digit hex code. 8\u20224 = 32, i.e. in the example program, the variable irLen means 32. A similar calculation is needed for a code with another length.<\/p>\n<p>Once you have entered all codes and parameters, and of course also your WLAN data, you can upload the program. The website of the board now contains six buttons that are labelled accordingly. When you push one of the buttons, a message should appear on the Serial Monitor and your TV or other device should react to the signal correctly. If not, you may need to get closer or check if the IR diode sends anything at all. An LED connected with the wrong polarity would be one possible reason why a project is not working as desired.<\/p>\n<p><div id=\"attachment_221\" style=\"width: 340px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2.jpeg\"><img aria-describedby=\"caption-attachment-221\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-221\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2.jpeg\" alt=\"Die TV-Remote Webseite\" width=\"330\" height=\"287\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2.jpeg 330w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2-300x261.jpeg 300w\" sizes=\"(max-width: 330px) 100vw, 330px\" \/><\/a><p id=\"caption-attachment-221\" class=\"wp-caption-text\">The TV-remote Website<\/p><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>Yesterday, you built a receiver for infra-red remote controls. Today, you are building the remote control itself. More precisely, you will build a universal remote control that you can operate by computer or Smartphone and with which you can operate&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/iot.fkainka.de\/en\/day-18\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":221,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3,26,311],"tags":[18,13,106,12],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Day 18: Universal remote control - Internet of Things with the NanoESP<\/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:\/\/iot.fkainka.de\/day-18\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Day 18: Universal remote control - Internet of Things with the NanoESP\" \/>\n<meta property=\"og:description\" content=\"Yesterday, you built a receiver for infra-red remote controls. Today, you are building the remote control itself. More precisely, you will build a universal remote control that you can operate by computer or Smartphone and with which you can operate...Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iot.fkainka.de\/day-18\" \/>\n<meta property=\"og:site_name\" content=\"Internet of Things with the NanoESP\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-17T22:01:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-24T15:04:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"330\" \/>\n\t<meta property=\"og:image:height\" content=\"287\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"fk\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"fk\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/iot.fkainka.de\/day-18\",\"url\":\"https:\/\/iot.fkainka.de\/day-18\",\"name\":\"Day 18: Universal remote control - Internet of Things with the NanoESP\",\"isPartOf\":{\"@id\":\"https:\/\/iot.fkainka.de\/#website\"},\"datePublished\":\"2015-12-17T22:01:00+00:00\",\"dateModified\":\"2018-10-24T15:04:08+00:00\",\"author\":{\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a\"},\"breadcrumb\":{\"@id\":\"https:\/\/iot.fkainka.de\/day-18#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iot.fkainka.de\/day-18\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/iot.fkainka.de\/day-18#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/iot.fkainka.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tag 18: Universal Fernbedienung\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/iot.fkainka.de\/#website\",\"url\":\"https:\/\/iot.fkainka.de\/\",\"name\":\"Internet of Things with the NanoESP\",\"description\":\"The webpage for the Arduino compatible WiFi-Board\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/iot.fkainka.de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a\",\"name\":\"fk\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g\",\"caption\":\"fk\"},\"url\":\"https:\/\/iot.fkainka.de\/en\/author\/fk\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Day 18: Universal remote control - Internet of Things with the NanoESP","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:\/\/iot.fkainka.de\/day-18","og_locale":"en_US","og_type":"article","og_title":"Day 18: Universal remote control - Internet of Things with the NanoESP","og_description":"Yesterday, you built a receiver for infra-red remote controls. Today, you are building the remote control itself. More precisely, you will build a universal remote control that you can operate by computer or Smartphone and with which you can operate...Read more","og_url":"https:\/\/iot.fkainka.de\/day-18","og_site_name":"Internet of Things with the NanoESP","article_published_time":"2015-12-17T22:01:00+00:00","article_modified_time":"2018-10-24T15:04:08+00:00","og_image":[{"width":330,"height":287,"url":"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2.jpeg","type":"image\/jpeg"}],"author":"fk","twitter_card":"summary_large_image","twitter_misc":{"Written by":"fk","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/iot.fkainka.de\/day-18","url":"https:\/\/iot.fkainka.de\/day-18","name":"Day 18: Universal remote control - Internet of Things with the NanoESP","isPartOf":{"@id":"https:\/\/iot.fkainka.de\/#website"},"datePublished":"2015-12-17T22:01:00+00:00","dateModified":"2018-10-24T15:04:08+00:00","author":{"@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a"},"breadcrumb":{"@id":"https:\/\/iot.fkainka.de\/day-18#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iot.fkainka.de\/day-18"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/iot.fkainka.de\/day-18#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/iot.fkainka.de\/"},{"@type":"ListItem","position":2,"name":"Tag 18: Universal Fernbedienung"}]},{"@type":"WebSite","@id":"https:\/\/iot.fkainka.de\/#website","url":"https:\/\/iot.fkainka.de\/","name":"Internet of Things with the NanoESP","description":"The webpage for the Arduino compatible WiFi-Board","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/iot.fkainka.de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a","name":"fk","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/141cf958a831e66efabf9674e117e8d9?s=96&d=identicon&r=g","caption":"fk"},"url":"https:\/\/iot.fkainka.de\/en\/author\/fk"}]}},"jetpack_featured_media_url":"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day18-2.jpeg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6McI0-3w","_links":{"self":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/218"}],"collection":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":5,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":595,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/218\/revisions\/595"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media\/221"}],"wp:attachment":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}