Micro OLED displaying garbled pixels when trying to get example to run

I’m using a ESP32 Thing Plus-S3 and a Qwiic connector to get the Micro OLED breakout working. However, when I tried running the example sketch, the following displays.

I thought at first it was the random pixel function but after realizing nothing else was happening I commented it out and nothing changed. Then I stripped down the example code to just one example and it still shows the same; here’s the code for that.


#include <Wire.h>
#include <SFE_MicroOLED.h> 
#define PIN_RESET 4


MicroOLED oled(PIN_RESET); 

void setup()
{
  delay(100);
  Wire.begin(8, 9); 

  oled.begin(0x3D, Wire);    
  oled.clear(ALL); 
  oled.display();  

  delay(1000); 

  oled.clear(PAGE); 

}


void lineExample()
{
  int middleX = oled.getLCDWidth() / 2;
  int middleY = oled.getLCDHeight() / 2;
  int xEnd, yEnd;
  int lineWidth = min(middleX, middleY);

  printTitle("Lines!", 1);

  for (int i = 0; i < 3; i++)
  {
    for (int deg = 0; deg < 360; deg += 15)
    {
      xEnd = lineWidth * cos(deg * PI / 180.0);
      yEnd = lineWidth * sin(deg * PI / 180.0);

      oled.line(middleX, middleY, middleX + xEnd, middleY + yEnd);
      oled.display();
      delay(10);
    }
    for (int deg = 0; deg < 360; deg += 15)
    {
      xEnd = lineWidth * cos(deg * PI / 180.0);
      yEnd = lineWidth * sin(deg * PI / 180.0);

      oled.line(middleX, middleY, middleX + xEnd, middleY + yEnd, BLACK, NORM);
      oled.display();
      delay(10);
    }
  }
}


void loop()
{
  lineExample();  // Then the line example function


}


void printTitle(String title, int font)
{
  int middleX = oled.getLCDWidth() / 2;
  int middleY = oled.getLCDHeight() / 2;

  oled.clear(PAGE);
  oled.setFontType(font);
  // Try to set the cursor in the middle of the screen
  oled.setCursor(middleX - (oled.getFontWidth() * (title.length() / 2)),
                 middleY - (oled.getFontHeight() / 2));
  // Print the title:
  oled.print(title);
  oled.display();
  delay(1500);
  oled.clear(PAGE);
}

The random garbled pattern isn’t constant, sometimes it changes when I upload different code to the board.
Here’s what else I tried so far

  • Different Qwiic Cables (only have two, so maybe two are busted)
  • Did an I2C scan and got the address as 0x3D
  • Different USB cables, different ports
  • Basic sketch to just say hello, didn’t work

This is the first time I’m using an ESP32 and the Qwiic stuff so maybe there’s something simple I’m overlooking but I’ll appreciate any help.

The last thing you might try is disabling the pull-up resistors (you’d just de-solder that blob labeled “PU” and re-test)

If that doesn’t get it going, it is likely a defective module - Was it purchased from us? If so head over to Returns (contact vendor if purchased elsewhere) and we’ll get ya squared away

1 Like

Just commenting if anyone else runs into this problem - I haven’t desoldered and tested but I don’t necessarily need a screen for my project so I do plan to return it.