{"id":1375,"date":"2016-12-15T00:01:28","date_gmt":"2016-12-14T23:01:28","guid":{"rendered":"http:\/\/iot.fkainka.de\/?p=1375"},"modified":"2018-10-24T16:05:11","modified_gmt":"2018-10-24T15:05:11","slug":"day15-2016","status":"publish","type":"post","link":"https:\/\/iot.fkainka.de\/en\/day15-2016","title":{"rendered":"Day 15: A web server"},"content":{"rendered":"<p>Since the Blynk platform was the central point of our projects over the last few days, now we&#8217;re coming to a totally new subject: the NanoESP as web server. You&#8217;ve already gotten a first impression of it in the test for the first day. In the coming days, we&#8217;ll see what all else is possible.<\/p>\n<p>Behind today&#8217;s door is a special two-core cable with which you can connect e.g. even LEDs or sensors outside the board. For today&#8217;s test, however, no hardware layout is necessary at all. You only need the programme and a browser.<br \/>\n<iframe loading=\"lazy\" style=\"height: 400px; width: 100%; margin: 10px 0;\" src=\"https:\/\/create.arduino.cc\/editor\/FKainka\/f0f6a5f2-7aab-4d2e-a897-aededbfeb9a2\/preview?embed\" width=\"300\" height=\"150\" frameborder=\"0\"><\/iframe><br \/>\nDownload the programme and program it on the board. You might be wondering why you don&#8217;t have to enter any WLAN data today. The reason is that the board, or more precisely the WLAN chip, still has your WLAN data stored from the previous test. A new function of the library now waits for a restart until a connection to the known WLAN has been made. If you&#8217;re using a new WLAN, you need to delete the comment characters before the line<\/p>\n<p><strong>nanoesp.configWifi(DUAL, SSID, PASSWORD);<\/strong><\/p>\n<p>so that the new data can be adjusted. The same is true for all subsequent days. There&#8217;s something else new today: The board is used in dual mode. This means that the board both connects to your home WLAN network and generates its own access point. You can thus access the board in two ways.<\/p>\n<p>After the upload, two IP addresses also appear simultaneously on the serial monitor this time. The address that&#8217;s after +CIFST:APIP is that of the board in the access point WLAN. The one after +CIFST:STAIP is the one that the board has been assigned by the router. Because your computer is probably already connected to the home network, you should enter the second IP address in your browser. A main page appears through which you can reach other pages via links, all of which are also stored on the board. You can follow the calling up of a page on the serial monitor.<\/p>\n<div id=\"attachment_1376\" style=\"width: 626px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1.jpg\"><img aria-describedby=\"caption-attachment-1376\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-1376 size-large\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1-1024x801.jpg\" alt=\"Das Board ist \u00fcber zwei Netzwerke erreichbar, aber nur eins hat eine Internetverbindung\" width=\"616\" height=\"482\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1-1024x801.jpg 1024w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1-300x235.jpg 300w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1-768x601.jpg 768w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1-972x760.jpg 972w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_1.jpg 1376w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/a><p id=\"caption-attachment-1376\" class=\"wp-caption-text\">The board can be accessed through two networks, but only one has an Internet connection<\/p><\/div>\n<div id=\"attachment_1378\" style=\"width: 454px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_3-1.jpg\"><img aria-describedby=\"caption-attachment-1378\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-1378 size-full\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_3-1.jpg\" alt=\"Die Webseite im Browser\" width=\"444\" height=\"351\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_3-1.jpg 444w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_3-1-300x237.jpg 300w\" sizes=\"(max-width: 444px) 100vw, 444px\" \/><\/a><p id=\"caption-attachment-1378\" class=\"wp-caption-text\">The website in the browser<\/p><\/div>\n<p>If you now want to connect your PC to the NanoESP&#8217;s own WLAN, you have to call up the access point IP address in the browser. The pages are the same, with the exception that no pictures are displayed. The reason is that the PC has no connection to the Internet through this network and thus the images, as external resources, can&#8217;t be loaded. The advantage of this network mode, however, is that you don&#8217;t need a router as a way station but can access the board directly. Both methods thus have their advantages and disadvantages.<\/p>\n<p><div id=\"attachment_1379\" style=\"width: 555px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_2_SeMo.jpg\"><img aria-describedby=\"caption-attachment-1379\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-1379 size-full\" src=\"http:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_2_SeMo.jpg\" alt=\"Die IP-Adressen und Browser-Requests im Seriellen Monitor\" width=\"545\" height=\"528\" srcset=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_2_SeMo.jpg 545w, https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_2_SeMo-300x291.jpg 300w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/a><p id=\"caption-attachment-1379\" class=\"wp-caption-text\">The IP addresses and browser requests on the serial monitor<\/p><\/div><\/p>","protected":false},"excerpt":{"rendered":"<p>Since the Blynk platform was the central point of our projects over the last few days, now we&#8217;re coming to a totally new subject: the NanoESP as web server. You&#8217;ve already gotten a first impression of it in the test&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/iot.fkainka.de\/en\/day15-2016\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":1377,"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":[123,124,311],"tags":[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: A web server - 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\/day15-2016\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Day 15: A web server - Internet of Things with the NanoESP\" \/>\n<meta property=\"og:description\" content=\"Since the Blynk platform was the central point of our projects over the last few days, now we&#8217;re coming to a totally new subject: the NanoESP as web server. You&#8217;ve already gotten a first impression of it in the test...Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iot.fkainka.de\/day15-2016\" \/>\n<meta property=\"og:site_name\" content=\"Internet of Things with the NanoESP\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-14T23:01:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-10-24T15:05:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_3.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"444\" \/>\n\t<meta property=\"og:image:height\" content=\"351\" \/>\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\/day15-2016\",\"url\":\"https:\/\/iot.fkainka.de\/day15-2016\",\"name\":\"Day 15: A web server - Internet of Things with the NanoESP\",\"isPartOf\":{\"@id\":\"https:\/\/iot.fkainka.de\/#website\"},\"datePublished\":\"2016-12-14T23:01:28+00:00\",\"dateModified\":\"2018-10-24T15:05:11+00:00\",\"author\":{\"@id\":\"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a\"},\"breadcrumb\":{\"@id\":\"https:\/\/iot.fkainka.de\/day15-2016#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/iot.fkainka.de\/day15-2016\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/iot.fkainka.de\/day15-2016#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/iot.fkainka.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tag 15: Ein Webserver\"}]},{\"@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: A web server - 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\/day15-2016","og_locale":"en_US","og_type":"article","og_title":"Day 15: A web server - Internet of Things with the NanoESP","og_description":"Since the Blynk platform was the central point of our projects over the last few days, now we&#8217;re coming to a totally new subject: the NanoESP as web server. You&#8217;ve already gotten a first impression of it in the test...Read more","og_url":"https:\/\/iot.fkainka.de\/day15-2016","og_site_name":"Internet of Things with the NanoESP","article_published_time":"2016-12-14T23:01:28+00:00","article_modified_time":"2018-10-24T15:05:11+00:00","og_image":[{"width":444,"height":351,"url":"https:\/\/iot.fkainka.de\/wp-content\/uploads\/2016\/09\/Day15_3.jpg","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\/day15-2016","url":"https:\/\/iot.fkainka.de\/day15-2016","name":"Day 15: A web server - Internet of Things with the NanoESP","isPartOf":{"@id":"https:\/\/iot.fkainka.de\/#website"},"datePublished":"2016-12-14T23:01:28+00:00","dateModified":"2018-10-24T15:05:11+00:00","author":{"@id":"https:\/\/iot.fkainka.de\/#\/schema\/person\/d3205fdf2649027fc35e240d4f8b285a"},"breadcrumb":{"@id":"https:\/\/iot.fkainka.de\/day15-2016#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iot.fkainka.de\/day15-2016"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/iot.fkainka.de\/day15-2016#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/iot.fkainka.de\/"},{"@type":"ListItem","position":2,"name":"Tag 15: Ein Webserver"}]},{"@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\/2016\/09\/Day15_3.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6McI0-mb","_links":{"self":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/1375"}],"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=1375"}],"version-history":[{"count":3,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/1375\/revisions"}],"predecessor-version":[{"id":1520,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/posts\/1375\/revisions\/1520"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media\/1377"}],"wp:attachment":[{"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/media?parent=1375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/categories?post=1375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iot.fkainka.de\/en\/wp-json\/wp\/v2\/tags?post=1375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}