OLED Display Detected on Raspberry Pi 4, But Not Displaying Anything - Need Help!

Subscribe to the forum to receive notifications about new posts.
Post Reply
Mithilesh
Posts: 8
Joined: Tue Jul 09, 2024 3:24 pm

Hi everyone,

I’m trying to get my "0.96 Inch I2C/IIC 4pin OLED Display Module BLUE" to work with my Raspberry Pi 4, but I’m stuck. The display shows up when I scan for it on I2C (address 0x3C), but I can’t get anything to actually display on the screen.

Here’s what my setup looks like:

Setup Connections:

VCC to 3.3V (also tried 5V, no change)
GND to GND
SCL and SDA are wired to the correct I2C pins
Libraries: I’ve installed Adafruit_SSD1306, Adafruit_GFX, and tried luma.oled as well.

Code: My code initializes the display and attempts to print "Hello, World!" Here’s a simple version of it:

cpp code:

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

Adafruit_SSD1306 display(128, 64, &Wire, -1);

void setup() {
Serial.begin(115200);
display.begin(SSD1306_I2C_ADDRESS, 0x3C); // 0x3C is the detected address
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0,0);
display.print("Hello, World!");
display.display();
}

void loop() {
// Empty for now
}


What I’ve Tried
Double-checked Connections: All connections are solid and matched to the I2C pins.
Address Check: The I2C scan confirms the display is detected at 0x3C.
Power Supply: Tried both 3.3V and 5V—no difference.
Library Switching: I’ve tried multiple libraries to see if compatibility was an issue, but no luck.
Display Command: Ensured I’m calling display.display() to update the screen buffer.
Post Reply