Adafruit SSD1306 Library [Ported]

Hi @BusterSpark

I don’t see any pullups in your picture. Have you tried adding 4.7k pullups on i2c clock and data?

bko, do the level translators on the shield shield need pullups? If he was directly connected without the shield then the display has some onboard.

In the photo above, the clock and data wires go back to core’s D0 and D1 pins, not the level shifted Arduino shield connections.

I don’t know if the level shifters provide pull-ups or not (I have never looked at the schematic).

It is quick to try and I can tell for sure that I needed them for Adafruit i2c giant LED display.

Dang bko, I missed that! I pointed out to BusterSpark that the display will work with 3.3V only so he can power everything off the 3.3V line since the display only takes 20ma max. Right now it seems he has a mix of logic with SDA/SCL coming off the Spark at 3.3v, the CS coming from the shield at 5V and the display powered by 5V! The display has onboard level shifters so that protects the display.

BusterSpark, if you want to use the shield, use it for ALL signals so everything to the display is 5V or drop the shield and power the display off the 3.3V line on the Spark and connect all signals directly to the Spark. :smile:

Guys,

Well, i’m very happy to report that I2C is now working with the ported library.

I removed the Core from the Shield Shield, and connected directly to the OLED display.
Damn thing fired up instantly. I’m very pleased to have this working.

i guess there are mixed signals on the Shield Shield !

Thank you for help on this. (SOLVED for sure)

3 Likes

That is a beautiful sight BusterSpark! Glad it’s working :smile:

2 Likes

Got my 3 cores setup today using this route (I2C with the 128x64 OLED + Web IDE)… First try!

5 Likes

very nice, now link all three Sparks together using I2C.

Hey, guys, wondering if you can help me determine if I have something wrong or my OLED display is bad. I’m using the 1.3" unit from wide.hk (http://www.wide.hk/products.php?product=1.3"-128x64-OLED-Display-Module-SSD1306) I have the files (I2C ino/gfx and 1306) loaded from here https://github.com/pkourany/Adafruit_SSD1306 using I2C and nothing shows up the display. Thanks!

mattb93, first I’ll assume you have the correct wiring with BS0, BS1 and BS2 correctly jumpered for I2C. Do you have pull-up resistors (4.7K ohms) on both I2C lines? The Spark requires those for I2C to function properly. :slight_smile:

I have BS1 jumper on 1

On the spark I have
D0 going to Data (D1)
D1 going to Clk (D0)
D4 going to RES
3v going to 3V3
Gnd to Gnd

I do not have resistors I was using this wiring example as prev in this thread, are the resistors built in to the display unit perhaps?

Yes, the Adafruit display has the resistors built-in. I sure don’t see any on the photo of the board you are using. They won’t hurt anything, so you should try them; I think it is likely that you need them.

Thanks, I’ll give that a try tonight.

1 Like

Well… I guess it’s going to have to wait a while I thought I had the pull downs installed the right way and still nothing, but in the moving of wires on my board I accidentally put a 12v that I was using for driving a LED strip on one of the 3.3v output pins. It popped and now no LED, I I’m guessing it’s dead and I’ll have to order another.

Adafruit 128 x 32 SSD1306 OLED on Spark Core https://vine.co/v/MT5Ex5Vt19U

Thanks @peekay123! I’m going to do some work on the library… expect a PR :wink:

BTW, whoever submitted your library to the web IDE bailed and deleted their forked repo… now it’s a bastard child. Do you know if you can hijack it back with an up-rev?

@BDub I doubt it since I’m not the author of that IDE version. FYI, I want to release the mfGFX library to the IDE but with all the display-specific drivers we have so far as “examples”, including the SSD1306, ST7735, SharpMemory etc. Do you think this makes sense?

Well, you are the author of that code port... and if you click the GITHUB link it's 404'd. Go to his repo and you don't see Adafruit_SSD1306 anywhere. So we need a way for us to pick up abandoned libraries right?

The things I'm planning on doing to the library involve making support for 32 and 64 px high displays at runtime. Right now you have to edit the header file, and you can't do that once it's submitted to the Spark Libraries.

I totally agree. We need the ability to curate the libraries.

I also believe that when we add a library, it simply makes a copy so we can edit them as required. Any thoughts on my mfGFX library idea?

This rocks! Just playing around tonight... Spark Core is kickin' this SSD1306 OLED Display in the Apple-Dollar-Dollar-sign.


Mother Futhin' Graphics library? Heck yeah... actually I don't know what you mean... :smile:

3 Likes

@BDub, I created the multi-font (mf) GFX library that allows you to define your own fixed-height/variable width fonts from ttf fonts and use them instead of the single GLCDFONT found in the regular GFX library. The mfGF library, like the GFX library is designed to work with any Adafruit display “driver” like the SSD1306 one you did. I have several other working drivers for the ST7735, ILI9341, SSD1351, etc. The idea is to publish the single mfGFX library with ALL supported display drivers as a single library on the IDE. That’s what I was talking about :smile: