Help! Display Screens Not Working

I’ve been trying to get a screen working on my ESP32S3 for over 3 day with no luck. Can some please help me out with a set-up that will work? The following is what I have been trying.

Seeed Studio Xiao ESP32S3

I have tried a few screens:
2.42" 128x64 OLED SSD1309, 7pin, set to SPI
Screen inputs: GND, VCC, SCK, SDA, RES, DC, CS

0.96" 128x64 OLED JMDO.96C, 3 color SSD1306, 4pin, SPI/ i2C/ IIC
Screen inputs: VCC, GND, SCL, SDA

Arduino IDE 2.3.4
-Xaio ESP boards loaded
Loaded Libraries:

  • Adafruit BusIO
  • Adafruit GFX Library
  • Adafruit SSD1306

Sample sketch:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

#define OLED_RESET    -1  // Reset pin (not used)
#define SCREEN_ADDRESS 0x3C  // Common I2C address for OLED displays

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); 

void setup() {
  Serial.begin(115200);
  Wire.begin(6, 7); // (SDA, SCL) -> (D6, D7)

  if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
    Serial.println("SSD1306 not detected! Check wiring.");
    while (true); // Stop execution
  }

  Serial.println("SSD1306 detected!");

  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(10, 25);
  display.println("Hello, World!");
  display.display();
}

void loop() {
  // Nothing here, text stays on screen
}

The sketch was changed to reflect the different screens and comm protocol. Also, in my trouble shooting, I tried other SDA and SCL pins on the MC with the sketch reflecting any changes.

I loaded up the Blink Sketch to make sure the MC wasn’t totally dead. I also used Copilot and Chatgpt to do deeper trouble shooting to get something kind of reaction. But all the different test sketch’s had no results.

I also have a Waveshare 1.69" LCD Display Module 240x280 (SPI) and a 1602A screen to try but if I can’t get the first 2 screens to work, I think I’m going to have issues with these too.

Lastly, I also ordered new XIAO ESP32C6, SAMD21 and an additional ESP32C3 for just in case I smoked my original MC.

I need a full step-by-step tutorial/ instruction that includes connecting the screen wires to the proper pins, working sketch and proper setup for the IDE.

I have many MC’s and screen combinations to try.
Any help would be awesome and greatly appreciated!

If you make this line a comment, it will work fine.

ESP32S3    SSD-1306
D5    ----> SCL
D4    ----> SDA
3V3   ----> VCC
GND   ----> GND
//Wire.begin(6, 7); // (SDA, SCL) → (D6, D7)
2 Likes

It worked!!! Thank You!!!

I really want to use the 2.42" screen so now that I have proof that I can get a screen working, I will post my sketch/ set-up if I have any issues.

Thank you again!!!

Oh, since that line was commented out, could that line be removed?

OK, so no joy on the 2.42" screen. Here is my set-up:

Seeed Studio Xiao ESP32S3

2.42" 128x64 OLED SSD1309, 7pin, set to SPI
Screen inputs: GND, VCC, SCK, SDA, RES, DC, CS

Arduino IDE 2.3.4
-Xaio ESP boards loaded
Loaded Libraries:

  • Adafruit BusIO
  • Adafruit GFX Library
  • Adafruit SSD1306

Sketch:

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64

#define OLED_MOSI  4  // D4
#define OLED_CLK   5  // D5 (SCK)
#define OLED_DC    3  // D3
#define OLED_CS    1  // D1
#define OLED_RST   2  // D2

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, OLED_DC, OLED_RST, OLED_CS);

void setup() {
  Serial.begin(115200);
 if (!display.begin(SSD1306_SWITCHCAPVCC, OLED_CS, OLED_DC, OLED_RST)) {
    Serial.println("SSD1309 not detected! Check wiring.");
    while (true); // Stop execution if display not found
  }

  Serial.println("SSD1309 detected!");
  
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(10, 25);
  display.println("Hello, World!");
  display.display();
}

void loop() {
  // Nothing here, text stays on screen
}

All I get is a black screen.

Any help would be awesome and greatly appreciated!

Hi there,

So , can You fix the post and use the code tags above “</>” just paste it in there and it makes it easier to read and will get better halp results.

DO you have a picture of this set up? Which BSP are you using?
Also the Original topic was Solved , You may also consider the option to start a New Thread. and Put the Size in the Tittle.
:+1:
HTH
GL :slight_smile: PJ :v:

What is BSP?

FYI, your other suggestion are noted.

The board support Package , when you choose a particular board to build with, there is a BOARD file loaded , it’s version is viewable in the boards tab in the IDE. (search bar esp) you see the current one listed and a (pulldown) carrot next to it.
You can select older versions of the Vendor (in this case espressif) supplied files that support there boards… (rolling it back) sometimes is required because they break stuff and don’t always tell. (Like the rug pull to ESP-IDF 5.x) or if they add new chips… Hence the Nrf52840 went from 2.9.2 to 2.9.3 to add support for the PLUS series of the chip. You get it ?

HTH
GL :slight_smile: PJ :v:

Not sure if I found what you’re asking but this is what I found:
Arduino AVR Boards - 1.8.6
Adafruit BusIO - 1.17.0
Adafruit GFX Library - 1.12.0
Adafruit SSD1306 - 2.5.13

@threeflats,
In your case, the board name to select is
Tools->Boards->esp32->XIAO_ESP32S3

@msfujino

XIAO_ESP32S3 is selected. I’m trying to figure out if my sketch or IDE setup or pin connections are the issue or if this MC just can’t drive the 2.42" OLED SSD1309 display.

It was suggested that I start a new thread. So, I’m going to stop here and start a new post. Thank you everyone for helping out!

Please show me the connection between the SSD and S3 (probably 6 wires), the pin names of S3 should follow the “XIAO ESP32S3/XIAO ESP32S3 Sense Pin List” in the Wiki.
Please post a sketch.