0

Noise on SSD1306
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Noise on SSD1306

by aaron_shojaee on Mon May 31, 2021 5:49 am

I used an ESP32 and OLED ssd 1306 in my project . The physical connection is normally connected and I used I2C .
Here is my Question :
Why there is a full noise like old TV on my screen ?
here is my source code :

Code: Select all | TOGGLE FULL SIZE
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels



// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1 );

void setup() {
  Serial.begin(115200);
  for (int i=0; i <10 ; i++){
    Serial.println(i);
    delay(20);
  }

  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3c)) { // Address 0x3D for 128x64
    Serial.println(F("SSD1306 allocation failed"));
   
    for(;;);
  }
  delay(2000);
  display.clearDisplay();
  Serial.println("display cleared ");

  display.setTextSize(1);
  Serial.println("size set");
 
  display.setTextColor(WHITE);
  Serial.println("color white");
 
  display.setCursor(0, 10);
//   Display static text
  display.println("Scan!");
  Serial.println("SCAN has been printed");
//  display.println("Scan!");
//  display.display();
 
}

void loop() {
  display.println("Scan!");
 
  display.display();
  delay(2000);
 
 
}
Last edited by adafruit_support_mike on Mon May 31, 2021 8:16 pm, edited 1 time in total.
Reason: added CODE tags

aaron_shojaee
 
Posts: 1
Joined: Mon May 31, 2021 5:45 am

Re: Noise on SSD1306

by adafruit_support_mike on Mon May 31, 2021 8:16 pm

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 63053
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.