Flexible OLED display on Sparkfun ESP32 Thing

Hi everyone,

I recently purchased this wonderful display (LCD-14606) and I effortlessly got it to work with an Arduino UNO by using the provided examples and libraries.

For my project, however, I need to work with an ESP32, so I have been trying to connect it to the Sparkfun ESP32 Thing.

The SPI bus has been connected using the following pins:

18: SCLK

23: MOSI(SDIN)

5: _CS

13: _RS (any available GPIO can work)

I then updated the sketch (and “SSD1320_OLED.h” accordingly) in order to have the SPI pins matching.

In the compiling process, I had to modify the include command from " <avr/pgmspace.h>" to " <pgmspace.h>" in order to allow the compiler to find the library.

However after successful compilation and upload the display doesn’t work.

I, therefore, analyzed the SPI signals with a scope and the signals look unfortunately very different, not only in terms of timings but also content.

At this time I can only conclude that there must be some incompatibility of the SPI bus using the ESP32, maybe related to the fact that it gets used in a fancy way in order to be able to transmit 9 bits instead of 8.

I noticed I am apparently not the only one having issues with this, but I couldn’t find any useful information on this topic within this forum, so any input would be very much appreciated.

Thank you very much in advance,

  • MZ

Hi MZ.

The code for this is AVR specific and I’m surprised it even compiles for the ESP32 Thing even when switching to pgmspace.h. I’m not even sure pgmspace.h works at this point on the ESP32.

The display is non standard 9 bit SPI and I know there were some hacks needed to make it work under Arduino, my guess is that the same hacks don’t work on ESP. You might need to use a Pro Mini or something to act as a display driver and pass data from your ESP32 to the Pro Mini to be displayed.

Hi Chris,

thank you for your prompt answer: I appreciated it.

I do understand from your answer that Sparkfun does not have the code allowing to run the Flexible OLED display straight from the ESP32, which is a real pity considering the huge amount of resources of the controller.

I’m honestly a bit disappointed by the outcome, mostly because the Sparkfun shop once you are looking at the Flexible display it suggests at the bottom the “Hookup Accessories for SparkFun Flexible Grayscale OLED Breakout - 1.81” "

Among these accessories, there is the ESP32 Thing listed, which is the very reason for my choice.

Since I am in the process of designing a PCB for a new product, adding an extra controller doesn’t sound like the most elegant solution.

I will, therefore, try to dig deeper to see how hard it really is to port the code to the ESP32. Concurrently I understand the library is not fully functional because of the lack of documentation of the SSD1320 OLED driver which again is annoying.

For the sake of avoiding misunderstandings, I would personally suggest to state on the flexible OLED display page that it is currently supported only by limited Arduino controllers.

Thank you for your support,

  • MZ

TS-Chris:
Hi MZ.

The code for this is AVR specific and I’m surprised it even compiles for the ESP32 Thing even when switching to pgmspace.h. I’m not even sure pgmspace.h works at this point on the ESP32.

The display is non standard 9 bit SPI and I know there were some hacks needed to make it work under Arduino, my guess is that the same hacks don’t work on ESP. You might need to use a Pro Mini or something to act as a display driver and pass data from your ESP32 to the Pro Mini to be displayed.

Hi Chris,

I faced the same issue the MZ encountered. Is it possible that the Flexible OLED display can work with esp32 right now by any chance? I’m using the esp32 board for my project and it’s not ideal to add a relatively big microcontroller(UNO board).

Thank you.

zambonim:
Hi everyone,

I recently purchased this wonderful display (LCD-14606) and I effortlessly got it to work with an Arduino UNO by using the provided examples and libraries.

For my project, however, I need to work with an ESP32, so I have been trying to connect it to the Sparkfun ESP32 Thing.

The SPI bus has been connected using the following pins:

18: SCLK

23: MOSI(SDIN)

5: _CS

13: _RS (any available GPIO can work)

I then updated the sketch (and “SSD1320_OLED.h” accordingly) in order to have the SPI pins matching.

In the compiling process, I had to modify the include command from " <avr/pgmspace.h>" to " <pgmspace.h>" in order to allow the compiler to find the library.

However after successful compilation and upload the display doesn’t work.

I, therefore, analyzed the SPI signals with a scope and the signals look unfortunately very different, not only in terms of timings but also content.

At this time I can only conclude that there must be some incompatibility of the SPI bus using the ESP32, maybe related to the fact that it gets used in a fancy way in order to be able to transmit 9 bits instead of 8.

I noticed I am apparently not the only one having issues with this, but I couldn’t find any useful information on this topic within this forum, so any input would be very much appreciated.

Thank you very much in advance,

  • MZ
Hi MZ,

Have you figured out how to make the Flexible OLED display on esp32 by any chance? I encountered the same issue as you, the code could be uploaded successfully but nothing showed up on the display.

Thank you so much.