OLED screens in Arduino IDE

Quick post (my first here, actually) about using OLEDs with Seed & Pod in the Arduino environment. I was concerned after reading several posts in other sections of the forum that this might be difficult, and I would have to go to a full-up C++ environment, but it turns out be be stupidly easy. Using the connection diagram generously provided by kreiff in this post https://forum.electro-smith.com/t/oled-pin-connections/273 the standard Adafruit SSD1351 and GFX libraries just simply work. I like using displays like these in my other projects using Teensy’s and such, so obviously I’m excited that I’ll be able to do the same types of things with this board Thought others would like to know.

6 Likes

Hello…I have 3 arduino nano clones (Lafvin Nano), none of which appear to work with OLED screens. I bought an OLED screen off of amazon, attempted an Adafruit model with every one of the 3 of my nanos, and it didnt work. I ensured my wiring was right, and I am practically 100% sure that I am wiring it up accurately through my multiple times checking it against the charts, with the pulldown resistors and everything. Inevitably, I expected the showcase must be broken, so I sent it back and requested 3 more. Incredibly, these screens didn’t work either! Is it conceivable that my clones are not viable with OLED screens?

ClyLunt,

Which OLED screens did you buy? The screens I’m using currently are RGB driven with the SSD1351 chip. I have a few of the the Lafvin nanos, I can run some tests with them to see if I can get this display to work. Another thing IIRC is that I had to use the hardware SPI constructor and pins to get this one working with both the Teensy board and the Daisy, that may also be true with the nano…

I just checked with both a Lafvin and genuine Arduino Nano, and and Uno, the demo ran, but you absolutely MUST use the hardware SPI pins and constructor with the SSD1351 boards I got, so I suspect the same is true for yours as well. Also, I noticed the default font in the demo dosn’t look that great on these, I was using custom fonts with the Teensy that looked much better, so you may have to experiment to see what looks good for your application.

Try that, as well as making sure you’re using the correct driver library for the chipset on the display, some of the monochrome ones use the SSD1306 chip which uses a different library. Although I can’t check it, I suspect they may have the same SPI usage issue. Hope this helps.

Bob

Hi I just got a pod to practice on as I’m kinda prototyping a module and I wanna add a screen, except I haven’t really wanted arduino, or hadn’t thought of using it, is it the cleanest way to do it? My skills are currently definitely in beginner class

Boredfloors,

Honestly, the answer depends upon what prior programming experience, if any, you’ve had. It looks like currently the Daisy supports C++, Arduino IDE (which frankly is a simplified variant of C/C++), MAX/MSP and Pure Data. When I started programming decades ago for tasks related to my employment, it was almost exclusively in Basic/Visual Basic, and I found other languages at the time very intimidating. What I discovered when getting into Arduino projects was that the logic behind any programming language will mostly carry over into others, it’s just a matter of getting used to the structure and format of the one you’re learning.

Having said that, there is a big difference between the text-based languages C++ and Arduino, and the block object based MAX/MSP and Pure Data in that the latter two are visually oriented where you place blocks in a workspace and define their functions. Also, while C++, Arduino and PD environments are or can be completely free, it looks like you can only use MAX free for 30 days before you have to pay for it.

If you’re just starting out with no prior programming experience, the lesson I’ve learned is that it probably doesn’t matter which one you start with, what matters is starting with simple programs to “learn the ropes” so to speak and gain confidence in what you’re doing. However, I suspect that to add a screen to a Pod project would require using either C++ or the Arduino environment since there are many “plug & play” libraries for those environments out there, especially for Arduino. I can’t speak directly to MAX or Pure Data but I suspect you may have to build your own library objects to get something on a screen for the Pod.

So having said all that, you’re probably best off going with C++ or Arduino if you’re adding hardware like a screen that’s not built into the platform as on the Pod. The Patch has a monochrome OLED screen, but my understanding is they’ve built their own objects to support that one, and they would be specific to the driver chip on the display, which I’m not sure they’ve disclosed (anyone else know what’s used on the Patch?). If you go the Arduino route, I can highly recommend Adafruit’s display libraries. They have several that are for specific but common driver chips that are used on most of the OLED and TFT displays that are out there, including the cheep Chinese boards.

I hope this helps.

Bob

1 Like