{"id":2296,"date":"2012-03-04T16:57:58","date_gmt":"2012-03-04T21:57:58","guid":{"rendered":"http:\/\/www.plastibots.com\/?p=2296"},"modified":"2015-02-07T12:25:22","modified_gmt":"2015-02-07T17:25:22","slug":"adafruit-monochrome-128x32-oled-graphic-display","status":"publish","type":"post","link":"https:\/\/www.plastibots.com\/index.php\/2012\/03\/04\/adafruit-monochrome-128x32-oled-graphic-display\/","title":{"rendered":"Adafruit Monochrome 128&#215;32 OLED graphic display"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2304 alignright\" title=\"SSD1306AdafruitOLED_1\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2012\/03\/SSD1306AdafruitOLED_1-300x199.jpg\" alt=\"\" width=\"300\" height=\"199\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2012\/03\/SSD1306AdafruitOLED_1-300x199.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2012\/03\/SSD1306AdafruitOLED_1.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/> I recently got my hands on the <a href=\"https:\/\/www.adafruit.com\/products\/661\" target=\"_blank\">Adafruit Monochrome 128&#215;32 OLED graphic display<\/a> for my next project. \u00a0This is a 128&#215;32 OLED B+W graphics chip and it&#8217;s tiny! \u00a0Don&#8217;t let its size fool you however. Being an OLED display, \u00a0text\/graphics contrasts well against the black background. \u00a0My initial intent for this display was to use it to provide information to you GPS Red Light Camera project. \u00a0It&#8217;s job would be to provide key information such as; the distance to the next red light camera location, the direction of the vehicle (and possibly direction of the camera later on), speed, # of satellites, as well as Lat and Log. \u00a0However, after some dry runs, I found that reading the information was too difficult if it was sunny out. \u00a0Of course the obvious holds true that I should not be taking the time to read this sort of info while driving anyhow. \u00a0The intent was more of an info display for viewing while stopped etc. \u00a0 However, the purpose of this write-up is not to discuss the merits of these things, but rather the quality of this display. More info on the project will come soon.<\/p>\n<p><!--more--><\/p>\n<p>So, how about the quality. \u00a0My first test was take some graphics and try to render them to the tiny screen. \u00a0 Keep in mind we are working with 128W x 32H pixels here folks. \u00a0The Adafruit <a href=\"http:\/\/ladyada.net\/products\/oled12864\/\" target=\"_blank\">tutorial<\/a> references a handle little app called LCD Assist that allows you to convert a monochrome bitmap to a character array which you can dump directly into your sketch and have it display the image. \u00a0The image to the right shows a rendering of a car. \u00a0The pixelation that is showing is due to my resizing the original image down to something that I could fit on the screen. \u00a0The two lines are drawn using a built-in <em>drawline<\/em> function. \u00a0 The second image shows the rendering of text and variables to the screen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2305 alignright\" title=\"SSD1306AdafruitOLED_2\" src=\"http:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2012\/03\/SSD1306AdafruitOLED_2-300x201.jpg\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2012\/03\/SSD1306AdafruitOLED_2-300x201.jpg 300w, https:\/\/www.plastibots.com\/wordpress\/wp-content\/uploads\/2012\/03\/SSD1306AdafruitOLED_2.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Example (draws Latitude and Longitude and their related values):<\/p>\n<p>&nbsp;<\/p>\n<div id=\"_mcePaste\">\/\/latitude<\/div>\n<div id=\"_mcePaste\">ftoa(cVal, flat, 2);<\/div>\n<div id=\"_mcePaste\">oled.drawstring(0, 3, &#8220;Lat:&#8221;);<\/div>\n<div id=\"_mcePaste\">oled.drawstring(25, 3, cVal);<\/div>\n<div id=\"_mcePaste\">\/\/longitude<\/div>\n<div id=\"_mcePaste\">ftoa(cVal, flon, 2);<\/div>\n<div id=\"_mcePaste\">oled.drawstring(65, 3, &#8220;Lng:&#8221;);<\/div>\n<div id=\"_mcePaste\">oled.drawstring(90, 3, cVal);<\/div>\n<p>&nbsp;<\/p>\n<p>Edit: I&#8217;ve recently added this display to my <a href=\"http:\/\/www.plastibots.com\/?p=2333\">Temp \/ Humidity Monitor<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\">[ad name=&#8221;GoogleAS728x90ImgOnly&#8221;]<\/p>\n<p><strong><span style=\"text-decoration: underline;\">The good:<\/span><\/strong><\/p>\n<ul>\n<li>At $17.xx, this is reasonably priced for a small, crisp, thin, OLED package.<\/li>\n<li>As always, Adafruit does a great job with providing drivers, samples, and a tutorial to help even the newest of noobs get this thing up-and-running.<\/li>\n<li>It&#8217;s thin &#8211; really thin. \u00a0Great for small projects where space is limited but you want to dump lots of info to the screen.<\/li>\n<li>Four mounting holes are provided on the board. \u00a0It&#8217;s hard to tell, but the above OLED is mounted to a piece of clear acrylic.<\/li>\n<li>Having the connections all broken out (and labeled) to a header is a must have for those of us who cant work with those tiny ribbon connectors.<\/li>\n<li>Headers are also supplied &#8211; its nice to see\u00a0small added touches like this and Adafruit does this with most all of their products. \u00a0The passion shows through. \u00a0It would be a shame to wait a week or so to find out you don&#8217;t have a spare header laying around and your favourite electronics store is closed for the day!<\/li>\n<li>Support! Let&#8217;s not forget the intangibles &#8211; Adafruit had an excellent <a href=\"http:\/\/forums.adafruit.com\/\" target=\"_blank\">forum <\/a>where you can post your questions and get answers fast. \u00a0It&#8217;s an excellent community and everyone there is very welcoming and want to help. \u00a0Even Adafruit staff often weigh in to offer support.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">The not so good:<\/span><\/strong><\/p>\n<ul>\n<li>Wiring: \u00a0Rrequires a lot of wires &#8211; a total of 7. \u00a0However, this is to be expected given the nature of what it is. \u00a0 I managed to find a flat-wired CAT5 cable in my search for something small and flexible. \u00a0(The options are limited if you want to keep the cable to a minimum). \u00a0The problem with this particular cable was that the encompassing insulator is moulded around all 8 internal wires. \u00a0After carefully stripping back all 8 on both ends, I figured I had to find something else if I was going to do this again (which I am &#8211; more in that in another post). \u00a0As irony would have it, I later came across <a href=\"http:\/\/www.dealextreme.com\/p\/network-retractable-cable-473\" target=\"_blank\">these<\/a>. \u00a0Already ordered 4 for next time around! \u00a0An aside note: \u00a0I like to look of people&#8217;s faces when they see me take apart things immediately after they arrive. \u00a0The look of \u00a0why!? \u00a0Then they get it once they know what I do for sh*ts and giggles&#8230; err&#8230; I mean my hobby.<\/li>\n<li>Sunlight: \u00a0It was difficult to view the text in bright sunlight while in the vehicle. \u00a0This is part due to its size and secondly that you can only get so much contrast with this (or most any other) display. \u00a0I am sure that if I was able to inset the OLED in some sort of compartment, the result would be much better.<\/li>\n<li>Size: \u00a0This is a tiny OLED. \u00a0However, I knew that going in so I can&#8217;t really complain. \u00a0I put this here as it is important to know what you need going into a project. \u00a0This unit works great if you are working with a project that needs to be small. \u00a0If you want something a little larger, Adafruit sells a <a href=\"https:\/\/www.adafruit.com\/products\/326\" target=\"_blank\">128&#215;64 OLED<\/a> that is the sibling to this one. \u00a0I decided to take another leap and am currently working with the <a href=\"https:\/\/www.adafruit.com\/products\/358\" target=\"_blank\">1.8&#8243; TFT LCD display<\/a>, and am already very impressed with the result. \u00a0More on this later.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">Other thoughts:<\/span><\/strong><\/p>\n<ul>\n<li>For simple displaying of text, the provied driver works fine. \u00a0However, as part of my project, I was animating a road against a vehicle icon and it was too slow for my needs. \u00a0I followed the simple instructions on this\u00a0<a href=\"http:\/\/forums.adafruit.com\/viewtopic.php?f=19&amp;t=19079&amp;start=15#p103938\" target=\"_blank\">simple tweak you can do<\/a> to use hardware SPI to speed things up. \u00a0 Once I did this, it ran much faster and supported the necessary animations I was doing.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I recently got my hands on the Adafruit Monochrome 128&#215;32 OLED graphic display for my next project. \u00a0This is a 128&#215;32 OLED B+W graphics chip and it&#8217;s tiny! \u00a0Don&#8217;t let its size fool you however. Being an OLED display, \u00a0text\/graphics contrasts well against the black background. \u00a0My initial intent for this display was to use it to provide information to you GPS Red Light Camera project. \u00a0It&#8217;s job would be to provide key information such &hellip; <a href=\"https:\/\/www.plastibots.com\/index.php\/2012\/03\/04\/adafruit-monochrome-128x32-oled-graphic-display\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"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,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[65,57,1],"tags":[71],"class_list":["post-2296","post","type-post","status-publish","format-standard","hentry","category-arduino-electronics","category-electronics","category-uncategorized","tag-oled","has_no_thumb"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pK41j-B2","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/2296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/comments?post=2296"}],"version-history":[{"count":0,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/posts\/2296\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/media?parent=2296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/categories?post=2296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.plastibots.com\/index.php\/wp-json\/wp\/v2\/tags?post=2296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}