I2C 0.91" 128x32 Monochrome OLED display module

Hi!

I just bought this LCD module:
http://www.ebay.com/itm/I2C-0-91-128x32-Monochrome-OLED-display-module-compatible-Arduino-/160874357190?pt=LH_DefaultDomain_0&hash=item2574dbe1c6

And I want to wire it with my arduino, but because I’m totaly newbie I’m loking for some tutorials on how to do that. Does anyone have any link to help me?

Thanks!

  1. Locate SDA and SCL pins for your board: http://www.arduino.cc/en/Reference/Wire
  2. Locate SDA and SCL pins for your display (see ebay link)
  3. Connect display with board
  4. Find and install a library which supports the SSD1306 OLED (u8glib might work)

Oliver

olikraus: 1. Locate SDA and SCL pins for your board: http://www.arduino.cc/en/Reference/Wire 2. Locate SDA and SCL pins for your display (see ebay link) 3. Connect display with board 4. Find and install a library which supports the SSD1306 OLED (u8glib might work)

Oliver

Thanks on answer, I will try, and if some problem occur I will post here!

EDIT: Does anyone have some sample code of connecting this lcd using I2C?

I found the adafruit one, but in that code is mentioned reset pin of oled, but my lcd have only 4 wires.

This might work, but it has not been tested with your display.

#include "U8glib.h"

U8GLIB_SSD1306_128X32 u8g();

void draw(void) {
  u8g.setFont(u8g_font_unifont);
  u8g.drawStr( 0, 22, "Hello World!");
}

void setup(void) {
}

void loop(void) {
  u8g.firstPage();  
  do {
    draw();
  } while( u8g.nextPage() );
  
  // rebuild the picture after some delay
  delay(500);
}

Oliver

EDIT: Fixed constructor call.

Is this all what I need, should I include wire lib.?

You need to download and install u8glib http://code.google.com/p/u8glib/downloads/list. I would suggest to use the prerelease.

Is this all what I need, should I include wire lib.?

Yes, this is all you need and no, you do not need to include wire lib (u8glib has its own I2C subsystem)

Oliver

olikraus: You need to download and install u8glib http://code.google.com/p/u8glib/downloads/list. I would suggest to use the prerelease.

Is this all what I need, should I include wire lib.?

Yes, this is all you need and no, you do not need to include wire lib (u8glib has its own I2C subsystem)

Oliver

That sound's great. Thanks!

I made another mistake in the code, here is the fixed version:

#include "U8glib.h"

U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);

void draw(void) {
  u8g.setFont(u8g_font_unifont);
  u8g.drawStr( 0, 22, "Hello World!");
}

void setup(void) {
}

void loop(void) {
  u8g.firstPage();  
  do {
    draw();
  } while( u8g.nextPage() );
  
  // rebuild the picture after some delay
  delay(500);
}

Oliver