Adafruit SSD1306 [SOLVED]

@freddyroosevelt, you have an I2C display so you need to be running the ssd1306_128x64_i2c.ino demo app, not the SPI demo app.

1 Like

ok, i will try that. Is the wiring setup correct?

@freddyroosevelt, I may have spoken too soon. It is really not clear what that display uses. Do you have a link to where you purchased it from?

Its the - SERIAL OLED SCREEN,0.96" !!!.. It came with the Photon Maker Kit. This is the link to Particle Kit https://docs.particle.io/datasheets/photon-shields/#serial-oled-screen-0-96-quot-1-

Oled D0 goest to A3 and D1 goes to A5. Rest are ok.

1 Like

@freddyroosevelt: As @peekay123 has pointed out, please do use exactly the pins as outlined in my post

So you even need to change the other three wires (not D0, D1, D2, D3, D4 on the Core, but A3, A5, D3, D4, D5)!

You could save yourself (and us) a lot of grief, if you follow instructions a bit more closely.


BTW:

As I see you happen to run a Particle Core and not a Photon.
It shouldn't make any difference for your current project, but it might be important to give the correct information for some future questions.

1 Like

Thanks. Will try that

I do have the Photon, it came with the Photon Kit. I figured it didn’t matter if i was using my Core to get it up and running from my recent post with my images. When i posted the post you reposted, that was when i first got my photon kit and was using my photon at that time. Sorry if it caused confusion. I will put the pins back the way you originally said and see if that works. Thanks

Thanks @ScruffR @peekay123 for the help. I hooked up all pins like you guys said and i even switched my Core to my Photon ( to see if that would make a difference) but still got a blank oled screen. Guess its just not meant for me to figure that one out. but again thanks for the help.

@freddyroosevelt, now I have rewired my own breadboard to use exactly your jumper wires colors, to make things match when providing a pic of my working setup.
And in the course of doing so I realized, that I swapped around the SPI pins. I don’t know how often I read over that very part of my own post and even after @peekay123 has given you the correct pin numbers, I didn’t realize my error.
I got myself fooled by this part of the original library and took D0, D1 as the OLED pin names and matched them with the Particle SPI pins MOSI (A5) and CLK (A3)

// If using software SPI (the default case):
#define OLED_MOSI   D0
#define OLED_CLK    D1

Sorry for that :flushed:

So the correct and tested pinout should look like this

So what I actually should have given you is

// use hardware SPI
// OLED_D0 -> A3 (SPI CLK)
// OLED_D1 -> A5 (SPI MOSI)
#define OLED_DC D3
#define OLED_CS D4
#define OLED_RESET D5

(I have corrected all the above quotations accordingly)

Sorry again :blush:

4 Likes

no problem, I’m really trying to get this thing to work. Thanks I will try that and see if that works.

Problem Solved with Oled finally working with my Core and Photon!!!

Thanks a lot: @ScruffR @LukeUSMC @peekay123 it took me some time but i finally got it working lol

@ScruffR that last image setup was the correct way.

3 Likes

@johnwargo: Since this is your thread (but has drifted off but got some running setups) I’d like to mark this [SOLVED].
If you don’t see it solved, please comment - maybe we can help to solve your issues too.

1 Like

What does your final code look like for this ?

Not speaking for @freddyroosevelt, but my final code (which produces exactly what Freddy’s snap shows) is nothing else than the original sample SSD1306_128x64_SPI.ino with the alterations of post #8.

1 Like

Its the same code from the github - SSD1306_128x64_spi.ino as @ScruffR said. From @peekay123 repo located here: https://github.com/pkourany/Adafruit_SSD1306

Just make sure after you download the repo, once you’re in your project you should only have the:

Adafruit_GFX.cpp,
Adafruit_GFX.h,
Adadfruit_SSD1306.cpp,
Adafruit.h
and the ssd1306_128x64_spi.ino files only.

I have the exact code from that. Hope that helps.

@cr_huber, to add to Freddy’s post:
He is using Particle Dev, hence he’s using the github repo files and is pointing out the filelist.

If you are using Particle Build (Web IDE) - as I understand -, you’ll not need the files in your file tabs but only hit USE THIS EXAMPLE for said sample file.

If you are not that familiar with the libraries feature of Particle Build, have a read here
Library search, forkable library examples, and private libraries shipped to IDE

Hey guys!

Ok, so I have two brand new photons here (also have a few of the old Sparc cores). I would like to use them with the OLED 128x32 display I2C version. The particle IDE is still less than intuitive for someone used to a larger environment (if we ever get the Particle env hooked into Visual Studio? I will be in heaven).

In any case… I am trying to follow along here. I wire up the items and “include in this app” the appropriate 1306 community library and then it all goes wrong. It seems the library is built for the larger version of the display and of course it’s read only since it is an included library.

So whats the play here? Fork the library? Copy / paste the code by hand into my app? Is there a decent example of this that you guys can point me at so I am not wasting your time?

Feel free to just give me a strong hint, I am not a novice to development or Arduino, just this environment.

Ken

Have you got CLI installed?
Or Particle Dev?
These two options will be a bit easier to use with a fork or a downloaded ZIP of the SSD1306 library.

I just installed the Particle Dev so that I can work on this locally. I am a reasonable Atom user, so this works well for me :slight_smile: