OLED Pin Connections

I was actually able to solve my own problem before I came here, but I figured it might help some other folks if they were struggling to get their SSD1309 OLED connected correctly.

I initially bought the pod, but after seeing Carl’s Olearia project I really wanted to mess around with an OLED screen, so I picked one up to test some things out with. Just a standard 7 pin, SPI configured SSD1309.

I tried to follow the directions in the “hid_oled_display.cpp” source file - but I wasn’t getting any output - so I turned to the patch schematic and that got me sorted. I decided to make this little graphic so that I wouldn’t have to puzzle over the schematic each time I hook up the OLED:

One note: The pin numbers are the BLACK pin numbers from the DaisyPinoutRev4 image NOT the blue shaded libdaisy pin numbers.

Hope that helps some noobs (like me!) get going with an OLED with either seed or pod!

10 Likes

Hi
Thanks for posting.
Are you using the standard Daisy Lib code for your display ?
I have a POD

Hey Roy (Love your username, btw!)

I have a pod as well. I initially tested my OLED screen without making any changes to libdaisy. I just used the Olearia code from CarlColglazier’s github (https://github.com/CarlColglazier/Olearia).

He’s using the “daisy_patch.h” header file, but using the connections I noted above it should still display the main screen - so you can make sure you have all the pins connected correctly. (Carl posted a picture of the main screen on his thread here: Olearia: a collection of applets for the Daisy Patch)

After working out the pin connections, I did update “daisy_pod.cpp” and “daisy_pod.h” in …/DaisyExamples/libdaisy/src to include all the necessary display pin definitions and function calls so I could use pod.display.Fill(), pod.display.Update(), etc. in my pod projects.

I really just looked at “daisy_patch.cpp” and “daisy_patch.h” and just copied any OLED related stuff out of those files and pasted them into the respective pod files.

Once you make those changes, though, you need to rebuild the libraries. You can do that by navigating to your working directory (I’m just using /Desktop/DaisyExamples) and running “./rebuild_libs.sh”.

Hope that helps!

2 Likes

Cheers for that :slight_smile:
I’m just waiting for Amazon to send me a cheap 7 pin OLED

I2C OLED is cheap and easy.

Is I2C supported with the current driver? It looks like the header file (hid_oled_display.h) in libdaisy includes a comment that says “add I2C Support.”

If you wrote your own driver - more power too you! Beyond my skillset, haha!

Oops, forgot how incomplete the software is. I should probably order a Daisy.

Edit: I just ordered a Pod.

Hey kreiff,

could you post your patches (or a diff) and an example usage?
I am trying the same thing with my DaisyPod and a 7 pin OLED…

Best regards

Hey void,

Sure! I’ve uploaded some example code to my github. A very rudimentary oscilloscope example. I’ve also included the updated libdaisy “daisy_pod.cpp” and “daisy_pod.h” files with the OLED related code included from the PATCH source files.

You can check it out here:

2 Likes

Hey @kreiff thanks a lot!
It works. I just had to comment out this function which stopped the build of libdaisy

src/daisy_pod.cpp: In member function 'void daisy::DaisyPod::ChangeAudioCallback(dsy_audio_callback)':
src/daisy_pod.cpp:129:10: error: 'class daisy::DaisySeed' has no member named 'ChangeAudioCallback'
  129 |     seed.ChangeAudioCallback(cb);
      |          ^~~~~~~~~~~~~~~~~~~
src/daisy_pod.cpp: In member function 'void daisy::DaisyPod::ChangeAudioCallback(dsy_audio_mc_callback)':
src/daisy_pod.cpp:134:10: error: 'class daisy::DaisySeed' has no member named 'ChangeAudioCallback'
  134 |     seed.ChangeAudioCallback(cb);
      |          ^~~~~~~~~~~~~~~~~~~
make: *** [build/daisy_pod.o] Error 1 

Now I see blue sinuses dancing \o/

1 Like

I’ve made the changes to the files you suggest and unfortunately can not get the display going. In order to find out whether it is a wiring (or build) problem (I tested the display with an arduino and found that it is working well, so the display is not the problem) I would like to ask you to make available a binary file, so that I can maybe find out what is going wrong.