Loading...
Pages: [1]   Go Down
Author Topic: I2C 0.91" 128x32 Monochrome OLED display module  (Read 390 times)
0 Members and 1 Guest are viewing this topic.
Croatia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Germany
Offline Offline
God Member
*****
Karma: 69
Posts: 840
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Croatia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: March 02, 2013, 12:53:35 pm by jocoj100 » Logged

Germany
Offline Offline
God Member
*****
Karma: 69
Posts: 840
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
#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.
« Last Edit: March 02, 2013, 01:05:03 pm by olikraus » Logged

Croatia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Germany
Offline Offline
God Member
*****
Karma: 69
Posts: 840
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Quote
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
Logged

Croatia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 51
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Quote
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!
Logged

Germany
Offline Offline
God Member
*****
Karma: 69
Posts: 840
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made another mistake in the code, here is the fixed version:
Code:
#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
Logged

Pages: [1]   Go Up
Print
 
Jump to: