Go Down

Topic: I2C SSD1306 library. (Read 12317 times) previous topic - next topic

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

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.

olikraus

Hi

As a maintainer of u8glib (http://code.google.com/p/u8glib/) 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

Sacman

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?

Luck,

Wade

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.

Sacman

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.
Luck,

Wade

andig2

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?

0miker0

I'm using that exact display with with Adafruit graphics library.
https://sites.google.com/site/0miker0/arduino-sensor-board

Mike

olikraus

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

Oliver

andig2

And so does Adafruit: http://learn.adafruit.com/monochrome-oled-breakouts/arduino-library-and-examples

boi_goog

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

olikraus

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

Oliver

boi_goog

RTC uses I2C and Microsd card reader is SPI

olikraus

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

Go Up