{"id":201,"date":"2015-12-15T00:01:56","date_gmt":"2015-12-14T22:01:56","guid":{"rendered":"http:\/\/iot.fkainka.de\/?p=201"},"modified":"2018-10-24T16:04:08","modified_gmt":"2018-10-24T15:04:08","slug":"day-15","status":"publish","type":"post","link":"https:\/\/iot.fkainka.de\/en\/day-15","title":{"rendered":"Day 15: Light sensor"},"content":{"rendered":"<p>Today&#8217;s project does not use the web server&#8217;s website as a control interface, but as an output element. The brightness measured via a brightness sensor is displayed well-structuredly as a relative value.<\/p>\n<div id=\"attachment_203\" style=\"width: 626px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-1.jpg\"><img aria-describedby=\"caption-attachment-203\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-203\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-1-1024x500.jpg\" alt=\"Anschluss des Fototransistors an Pin A0\" width=\"616\" height=\"301\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-1-1024x500.jpg 1024w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-1-300x146.jpg 300w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-1-972x475.jpg 972w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-1.jpg 1106w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/a><p id=\"caption-attachment-203\" class=\"wp-caption-text\">The fototranistor at Pin A0<\/p><\/div>\n<p>Behind today&#8217;s door, there is another photo transistor that serves as a light sensor. The photo transistor looks like an LED, but should not be mistaken for one. The structure of today&#8217;s experiment is shown in the figure. The collector of the photo transistor is the shorter connection. It is applied to +5 V.<\/p>\n<p><strong>The program:\u00a0<a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15_TCPServerBright.zip\">Day15_TCPServerBright<\/a><\/strong><\/p>\n<p>Until now, the websites of the webserver were always made up of an unchangeable page that sent data to the controller. Today, the website is to be changed before being transmitted to the browser, to display the appropriate brightness of the photo transistor. This works because the source code of the website holds a kind of placeholder. The program now replaces the placeholder *bright* when loading the data from the Progmem variable by the current brightness value. Thus, the output text and the deflection of the slider are changed. Another line in the HTML file ensures that the page will reload automatically every few seconds. The current brightness is already displayed well-structuredly in the browser.<br \/>\n<a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-2.jpeg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-204\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-2.jpeg\" alt=\"Die Webseite des Helligkeitssensors\" width=\"269\" height=\"311\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-2.jpeg 269w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-2-259x300.jpeg 259w\" sizes=\"(max-width: 269px) 100vw, 269px\" \/><\/a><\/p>\n<p>The website of the brightness sensor<\/p>","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s project does not use the web server&#8217;s website as a control interface, but as an output element. The brightness measured via a brightness sensor is displayed well-structuredly as a relative value. Behind today&#8217;s door, there is another photo transistor&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/iot.fkainka.de\/en\/day-15\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":204,"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":[16,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 15: Light sensor - 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-15\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Day 15: Light sensor - Internet of Things with the NanoESP\" \/>\n<meta property=\"og:description\" content=\"Today&#8217;s project does not use the web server&#8217;s website as a control interface, but as an output element. The brightness measured via a brightness sensor is displayed well-structuredly as a relative value. Behind today&#8217;s door, there is another photo transistor...Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iot.fkainka.de\/day-15\" \/>\n<meta property=\"og:site_name\" content=\"Internet of Things with the NanoESP\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-14T22:01:56+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\/Day15-2.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"269\" \/>\n\t<meta property=\"og:image:height\" content=\"311\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/iot.fkainka.de\/day-15\",\"url\":\"https:\/\/iot.fkainka.de\/day-15\",\"name\":\"Day 15: Light sensor - Internet of Things with the NanoESP\",\"isPartOf\":{\"@id\":\"https:\/\/iot.fkainka.de\/#website\"},\"datePublished\":\"2015-12-14T22:01:56+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-15#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iot.fkainka.de\/day-15\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/iot.fkainka.de\/day-15#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/iot.fkainka.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tag 15: Lichtsensor\"}]},{\"@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 15: Light sensor - 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-15","og_locale":"en_US","og_type":"article","og_title":"Day 15: Light sensor - Internet of Things with the NanoESP","og_description":"Today&#8217;s project does not use the web server&#8217;s website as a control interface, but as an output element. The brightness measured via a brightness sensor is displayed well-structuredly as a relative value. Behind today&#8217;s door, there is another photo transistor...Read more","og_url":"https:\/\/iot.fkainka.de\/day-15","og_site_name":"Internet of Things with the NanoESP","article_published_time":"2015-12-14T22:01:56+00:00","article_modified_time":"2018-10-24T15:04:08+00:00","og_image":[{"width":269,"height":311,"url":"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2015\/09\/Day15-2.jpeg","type":"image\/jpeg"}],"author":"fk","twitter_card":"summary_large_image","twitter_misc":{"Written by":"fk","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/iot.fkainka.de\/day-15","url":"https:\/\/iot.fkainka.de\/day-15","name":"Day 15: Light sensor - Internet of Things with the NanoESP","isPartOf":{"@id":"https:\/\/iot.fkainka.de\/#website"},"datePublished":"2015-12-14T22:01:56+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-15#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iot.fkainka.de\/day-15"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/iot.fkainka.de\/day-15#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/iot.fkainka.de\/"},{"@type":"ListItem","position":2,"name":"Tag 15: Lichtsensor"}]},{"@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\/Day15-2.jpeg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6McI0-3f","_links":{"self":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/201"}],"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=201"}],"version-history":[{"count":5,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":591,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/201\/revisions\/591"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media\/204"}],"wp:attachment":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}