I2C SSD1306 library.

Has anyone used these little displays with much success?
http://www.wide.hk/products.php?product=I2C-0.96"-OLED-display-module-(-compatible-Arduino-)

I have one, they use the SSD1306 chip by Solomon, using I2C. All the libraries I can find (Adafruit, and some others) use SPI instead. Maybe I am just being really dense this late at night, but I cant seem to get it to work. The code included is very limited, basic text and graphics... would like to draw a line.... really just want to draw a line.

Hi

As a maintainer of u8glib (Google Code Archive - Long-term storage for Google Code Project Hosting.) I would like to say, that the support of a specific controller and the display is very difficult. I have hardly seen two controllers behaving in the same way. This means, we need totally different commands to bring something on the screen and i do not mean lines, but only single pixels.

u8glib itself supports the SSD1325 controller. But the SSD1306 will still be different. Of course u8glib could be expanded to support this display, But this is still a time consuming task.
I2C itself is also an issue, because u8glib (and most other libs) do not support I2C. It could be done, but it is not implemented yet.

Adding support to u8glib for SSD1325 means:

  • writing I2C low level driver
  • specification of the init sequence
  • specification of setting a single pixel

This is probably less then writing a lib from scratch...

Oliver

There is a link in the description of the item for Arduino source code. I didn't donwload it but I would assume that this includes everything you need to make this work. So why would you need to use a different library?

This source is very limited. I have it running, but it only lets me display a bitmap, and basic font. I have used GLCD Font creator to make my own font, but would like support for drawing lines, polygons and circles. Everything in code is really basic.

It looks like Adafruit sells a display with this same controller and they have a library for it. In their tutorials, they show text, bmp, and circles which implies that they probably run the gambit of shapes and such.

http://ladyada.net/products/oled12864/

take a look and see if this gets you further along.

pygaugette has a python library for running the SSD1306 via SPI. It was straight-forward to port this library for I2C. You can find my port here: https://github.com/andig/Adafruit-Raspberry-Pi-Python-Code
With this information and the arduino Wire library it shouldn't be very difficult to support this display on arduino, too?

I'm using that exact display with with Adafruit graphics library.

Mike

A quite old thread. To update myself: U8glib now also supports I2C for the SSD1306 controller.

Oliver

And so does Adafruit: Arduino Library & Examples | Monochrome OLED Breakouts | Adafruit Learning System

hellow, I tried to used these 2 libraries but when I pair it with an microsd card reader and an rtc, it wont work

This is too less information. I assume sd card will use SPI. If U8glib will I2C, then i do not expect problems.

Oliver

RTC uses I2C and Microsd card reader is SPI

Still to less information to give a usefull answer.
Please read section 11 of this thread carefully and follow the instructions there: http://forum.arduino.cc/index.php/topic,148850.0.html

Oliver