{"id":22,"date":"2015-07-30T20:24:02","date_gmt":"2015-07-30T19:24:02","guid":{"rendered":"http:\/\/davidjohntaylor.co.uk\/?p=22"},"modified":"2015-07-31T00:06:21","modified_gmt":"2015-07-30T23:06:21","slug":"nodemcu-and-oled-display-a-great-combination","status":"publish","type":"post","link":"https:\/\/davidjohntaylor.co.uk\/index.php\/2015\/07\/30\/nodemcu-and-oled-display-a-great-combination\/","title":{"rendered":"NodeMCU and OLED Display &#8211; a great combination"},"content":{"rendered":"<p>Ok, so I&#8217;ve got a bit too excited about what I&#8217;m about to describe, but\u00a0to be honest its quite cool (in a IoT nerd sort of way!).<\/p>\n<p>For a while, when I was first cutting my teeth on Internet of Things stuff, I had an Arduino happily chatting to a nice 2 line LCD display. \u00a0Nothing too fancy (except you could change the background colour!).<\/p>\n<div id=\"attachment_25\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"http:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-25\" class=\"wp-image-25 size-medium\" src=\"http:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1-300x300.jpg\" alt=\"0.96&quot; 128X64 OLED White I2C IIC Serial Display Module\" width=\"300\" height=\"300\" srcset=\"https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1-300x300.jpg 300w, https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1-150x150.jpg 150w, https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1-1024x1024.jpg 1024w, https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1-50x50.jpg 50w, https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/oled1.jpg 1600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-25\" class=\"wp-caption-text\">0.96&#8243; 128X64 OLED White I2C IIC Serial Display Module<\/p><\/div>\n<p>When I moved onto playing with a NodeMCU board, I realised that since the board is getting really small, then so does the display (for neat and tidy IoT devices anyway). \u00a0After a bit of a trawl of eBay and various forums I came across some unbelievably cheap (\u00a32.49!) 128&#215;64 pixel OLED displays which it was claimed worked straight out the box.<\/p>\n<p>The first order I made on eBay (which came from Malaysia, tracked for 29p!) didn&#8217;t make it past Heathrow. \u00a0Now to be honest, its really rare that stuff goes missing in the post these days, and most orders only take about 12 days to arrive. \u00a0But it&#8217;s gone, somewhere, so I decided on a <a href=\"http:\/\/stores.ebay.co.uk\/iotmodules?_trksid=p2047675.l2563\">UK order<\/a> costing \u00a35.98, so twice as much!<\/p>\n<p>But it arrived today, first class, and after work, I sat down to get it plugged into a breadboard and onto the NodeMCU. \u00a0After a entering a <a href=\"http:\/\/www.seeedstudio.com\/recipe\/index.php?controller=recipe&amp;action=show&amp;recipe_id=219&amp;ref=product\">bit of code I found<\/a>\u00a0into ESPlorer, and uploading it, the code ran&#8230; \u00a0&#8230;and the screen was blank. \u00a0It was then I realised I&#8217;d put in my usual 5 second pause (<a href=\"http:\/\/davidjohntaylor.co.uk\/index.php\/2015\/07\/30\/avoid-init-lua-hell\/\">see here why<\/a>) and then the screen sprang to life!<\/p>\n<div id=\"attachment_26\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/IMG_20150730_200324.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-26\" class=\"wp-image-26 size-medium\" src=\"http:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/IMG_20150730_200324-300x225.jpg\" alt=\"NodeMCU and 0.96&quot; 128X64 OLED Display\" width=\"300\" height=\"225\" srcset=\"https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/IMG_20150730_200324-300x225.jpg 300w, https:\/\/davidjohntaylor.co.uk\/wp\/wp-content\/uploads\/2015\/07\/IMG_20150730_200324-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-26\" class=\"wp-caption-text\">NodeMCU and 0.96&#8243; 128X64 OLED Display<\/p><\/div>\n<p>The code itself sets up the NodeMCU to scan for all visible access points and their power levels, then display them. \u00a0To my surprise (because generally these things are never THIS straight forward) it worked brilliantly.<\/p>\n<p>&#8220;So why so excited?&#8221; you ask. \u00a0Well the principle of getting a small display to work means I can now progress with the creation of some really small devices each of which can carry out monitoring tasks, but also display a nice local status of what its up to. \u00a0I&#8217;d previously used a couple of LED&#8217;s flashing in certain sequences when the device was unplugged from the PC to give me an idea of its status. \u00a0I can give up on my learning morse code and move to normal text!<\/p>\n<p>https:\/\/www.youtube.com\/watch?v=_LxPTKYOg0o<\/p>\n<p>Finally, why the 2p in the photo\/video &#8211; well it&#8217;s just to convey how small but capable this stuff is!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok, so I&#8217;ve got a bit too excited about what I&#8217;m about to describe, but\u00a0to be honest its quite cool (in a IoT nerd sort of way!). For a while, when I was first cutting my teeth on Internet of&hellip; <a href=\"https:\/\/davidjohntaylor.co.uk\/index.php\/2015\/07\/30\/nodemcu-and-oled-display-a-great-combination\/\" class=\"more-link\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":26,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,4],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet-of-things-iot","category-nodemcu"],"_links":{"self":[{"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":10,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/22\/revisions\/46"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/media\/26"}],"wp:attachment":[{"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidjohntaylor.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}