OLED via I2C
Tags: robots, oled
Published: 2013-11-17 10:00:00

---
title: OLED via I2C
published: true
tags: robots, oled
published_at: 20131117T10:00Z
canonical_url: https://ladvien.com/oled
main_image: https://ladvien.com/images/IMG_9167_-_Copy.JPG
---


{% embed https://www.youtube.com/embed/kNHjcDs1qfA %}

I guess it's been an I2C weekend.  I found these [organic light-emitting diode displays](http://en.wikipedia.org/wiki/OLED) (OLED)images[ ](http://imall.iteadstudio.com/im130625003.html)imagesat [Itead](http://imall.iteadstudio.com/im130625003.html) studio for $5\.

They might be small, but their extraordinary contrast and viewing angle more than make up for it.  Plus, I mean, c'mon, they're $5. I will say I was a little annoyed that they operate at 3.3v.  And I'm sure this means I'll be making a small little level converter board for them pretty soon.  I estimate the converter board would be around $1.25, simagestill a good price.images

images imagesimagesSome perks of OLEDs:images

1. imagesWider viewing angle (i.e., you don't have to look straight down at it).images
2. imagesNo back light, making them flatter and use less power (not a lot less).images
3. imagesHigh refresh rate.  The only time I saw a flicker is through my video camera.  And I had delay(10); in my code :) images
4. imagesThey are cheap(er?).images
5. imagesThey're the future :) images

The only downside that really jumped out at me was the libraries are about 9k flash uploaded.  The 64x64 LMR Bot was around 1k.

imagesWhen I got them I was worried I wouldn't be able to use them without digging into the [datasheets](ftp://imall.iteadstudio.com/Graphic_Display/IM130625003_128x64_OLED_Module/DS_SSD1306.pdf). But come to find out, they were exactly the same unit as on [Adafruit's boards](http://www.adafruit.com/products/326).  Sorry, I love you Ada...but...can't afford $19.50. Now, maybe if [Becky Stern](http://sternlab.org/) came with them.  Erm.  Anyway, with Ada's excellent guides and software I had the LMR Bot moving around in about 10 minutes.  So, I'll end up buying something from Ada to monetarily say, "Thank you, love."images

* [Adafruit's Guides on working with the imagesSSD1306 images128x64 OLED](http://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples)
* [Ada's Arduino libraries for working with the SSD1306](https://github.com/adafruit/Adafruit_SSD1306) (it supports basic shapes, lettering, and bitmaps)
* [LCD Assisstant](http://en.radzio.dxp.pl/bitmap_converter/) (for converting bitmaps to byte arrays).

The connections go something like this:

```text
* imagesArduino Uno 3.3v <------------> OLED VCCimages
* imagesArduino Uno 3.3v <------------> LV of Logic Converterimages
* imagesArduino Uno 5v <------------> HV of Logic Converterimages
* imagesArduino Uno Gnd <------------------> OLED GNDimages
* imagesArduino Uno Gnd <------------------> LV Logic Converter GNDimages
* imagesArduino Uno Gnd <------------------> HV Logic Converter GNDimages
* imagesArduino Uno A5 (SCL) <---------  Channel 1 Logic Converter --------> OLED SCLimages
* imagesArduino Uno A4 (SDA) <---------  Channel 2 Logic Converter --------> OLED SDAimages
* imagesArduino Uno D4 (SCL) <---------  Channel 3 Logic Converter -------->  OLED RESETimages
```

I know, I know; I'm working on a converter adapter to make tha all those wires go away.

![](https://ladvien.com/images/IMG_9168.jpg)

I'm real happy with these little boards :)