Adafruit SSD1306 [SOLVED]

I’ll have to test with Paul’s (peekay123) code, since I used the WebIDE one - maybe there is a difference in the wiring.


Edit:
OK, I have tried Paul’s code as is in https://github.com/pkourany/Adafruit_SSD1306/blob/master/ssd1306_128x64_spi.ino
and it works as expected.

So I’d take a closer look at your wiring.

If your photo from above is still the state you are using it, you’ve missed this part of my previous post

2 Likes

Will try it now. Thanks

still didn’t work. Have no clue what I’m doing wrong. I added

// use hardware SPI
// OLED_D0 -> A5
// OLED_D1 -> A3

and still got a blank screen. I also did the wiring as i had above and added the wires for D0 A5 & D1 A3. but Thanks again for the help.

Could you please shoot a new pic of your wiring?

I had another look at your pic above and I think you have a severe problem with your wiring.
If I’m not mistaken you just propped the jumper wires into the proto holes of the shield shield.

This is not how you do it. Jumper wires need to be put into female headers to ensure propper contact.
Proto holes are for soldering!

The shield has rows of female headers where you can plug the wires in.
Find the correct pins and rewire your whole setup and shoot a new pic of the rewired setup.

1 Like

ok, thanks i will try that @ScruffR

This is how i re-setup the oled & core. But when i run the code in Particle IDE, still nothing happens. Not sure if my setup was correct with my shield so i just put the core on the breadboard instead. I wasn’t sure how to hook up the female headers on the shield. Thanks

#1. Oled setup

#2. Core setup

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