Adafruit SSD1306 [SOLVED]


#31

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


#32

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


Getting started with Photon Maker Kit totally confused
#33

Thanks. Will try that


#34

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


#35

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.


#36

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


Getting started with Photon Maker Kit totally confused
Photon Maker Kit Feedback
#37

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


#38

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.


#39

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


#40

What does your final code look like for this ?


Can't get SSD1306 example to compile [SOLVED]
#41

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.


#42

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.


#43

@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


#44

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


#45

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.


#46

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:


#47

In this case you just have to be aware of some things.
Each project needs its own directory, which only contains one .INO file and the required .H/.CPP files, any other file needs to be excluded from the build via an entry in a spark.ignore file in that directory.
To be able to build the project, you should open the project folder (Open Folder ...) rather than the .INO file.
Particle Dev does not trigger a firmware update, hence when your device is running an old system firmware version (or a new version gets released), you need to “manually” update the system firmware, since Dev always targets the most recent version.


#48

Ok, sounds reasonable enough :smile:

I’ll see about putting the right files in place now.


#50

Thanks, Yes this works for me on the Photon. It may be obvious but it should be pointed out that in Feddy’s file list for the Particle Dev, “Adafruit.h” should read “Adafruit_SSD1306.h”


#51

I’ve followed all the steps suggested, however when I attempt to flash I get “Flash unsuccessful” and when I expand I get “Request Timed Out” I’ve tried changing networks and still get the same issue. Any suggestions?