I’m working on a project called “SenseBox” that includes:
- CH340
- ESP8266
- BME680 sensor
- SSD1306 OLED display
https://gitlab.com/bytewire/sensebox
The hardware implementation for the Display i got from here: http://wiki.sunfounder.cc/index.php?title=OLED-SSD1306_Module
Got the display from aliexpress: https://de.aliexpress.com/item/1005006419941940.html
The BME680 and OLED display are both connected to the ESP8266 via I2C. The sensor works great, and I’m getting data without any issues. However, the display refuses to turn on. The I2C connection seems fine, and there’s no error in the software.
I tried both I2C addresses i found mentioned online which are 0x3C and 0x3D. My test implementation looks like the following
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Arduino.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
Serial.begin(115200);
Serial.println("Initializing SSD1306...");
// SSD1306 initialization
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3C for 128x64
Serial.println(F("SSD1306 allocation failed"));
while (true); // Don't proceed, loop forever
}
Serial.println("SSD1306 initialized successfully.");
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0, 0); // Start at top-left corner
display.println(F("Hello, World!"));
display.display();
Serial.println("Message displayed on SSD1306.");
}
void loop() {
Serial.println("Updating display...");
display.clearDisplay();
display.setCursor(0, 0);
display.println("Testing SSD1306");
display.display();
delay(1000);
display.clearDisplay();
display.setCursor(0, 0);
display.println("ESP8266 Debug Output");
display.display();
delay(1000);
}
I’ve attached the schematics for reference. Any ideas on why the display might not be working?
EDIT:
From the Datasheet: After VDD become stable, set RES# pin LOW (logic low) for at least 3us (t1) (4) and then HIGH (logic high).

