How to wire Waveshare OLED 128x128 pixel (SSD1327) to ESP-07

Hello,

today started working with ESP-07. I clould make the blink demo working.
Now I wanted to add an OLED display (Waveshare OLED 128x128 pixel (SSD1327))

https://www.waveshare.com/wiki/1.5inch_OLED_Module

In Arduino IDE I used the "Hello world" demo of following library:

From this library I uncommented following constructor:

U8X8_SSD1327_MIDAS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);

But now I have a problem, I do not really know how to wire the OLED display to my ESP-07.

The OLED display has follwing pins (Vcc and GND is obvious, so I did not mention them here):

  • DIN
  • CLK
  • CS
  • DC
  • RST

In the documentation for ESP07 I found following SPI GPIO pins:

  • SCK - GPIO14
  • MISO - GPIO12
  • MOSI - GPIO13
  • CS - GPIO15

But I don't know what pin on OLED side to connect with what pin on ESP07 side.
Could someone explain it to me?

And what should I do with the RST pin of my OLED? There is no equivalent pin on ESP07 side.

I further have to set the correct pin numbers in the u8x8 constructor.

What ESP07 pin I have to enter in the constructor for:

  • clock
  • data
  • cs
  • dc
  • reset

The HelloWorld example has following setup-function:

void setup(void)
{
  /* U8g2 Project: SSD1306 Test Board */
  //pinMode(10, OUTPUT);
  //pinMode(9, OUTPUT);
  //digitalWrite(10, 0);
  //digitalWrite(9, 0); 
  
  /* U8g2 Project: KS0108 Test Board */
  //pinMode(16, OUTPUT);
  //digitalWrite(16, 0); 
  
  u8x8.begin();
  u8x8.setPowerSave(0);
  
  
}

How I have to change it to work with my OLED?

Thanks a lot...

For a U8g2 or U8x8 constructor which has a "SW_SPI" at the end, the wiring is very simple: You can connect the five inputs of your display to ANY gpio pin of your board.
Once you did this, write put the pin number of the GPIO pin at the correct position in the constructor arguments.

I once created a tutorial for this: setup_tutorial · olikraus/u8g2 Wiki · GitHub

Oliver