Pages: [1]   Go Down
Author Topic: I2C SSD1306 library.  (Read 8854 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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
Logged

Cleveland, TN
Offline Offline
Full Member
***
Karma: 2
Posts: 207
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Luck,

Wade

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Cleveland, TN
Offline Offline
Full Member
***
Karma: 2
Posts: 207
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Luck,

Wade

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Nova Scotia
Offline Offline
Full Member
***
Karma: 4
Posts: 189
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Mike
Logged

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

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

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

RTC uses I2C and Microsd card reader is SPI
Logged

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

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
Logged

Pages: [1]   Go Up
Jump to: