oled 1306 not displaying - stumped

Purchased several 1306 oleds from banggood. Ran the i2c scanner to confirm address is 0x3C.

Downloaded 2 adafruit library (GFX & OLED). Modified the example file with 0x3C

No info on the OLED.

Tried on 2 boards, uno & mega.

Did a voltage test on 5v out and it read 4.7v.


I also tried u8glib library. No luck.

Stumped. What do I try next?

Solved. 2 bad boards. Third board worked fine.

Then I guess it would be bangbad?

Hi Gregg, I am having big problem to make the Arduino Uno and the 128 x 64 OLED LCD communicating with each other. Late's say, the connection are donr correctly but the sketch is working properly. I have copied the free sketch from Youtube but I must have done something wrong when uploading the code. I am try to make a mini oscilloscope that shows frequencies but so far I haven't obtain major result. Have you got a sketch that make the Oled LCD running? It will be great if you can help me with this!!

Best

Angelo

angelomadonna: Hi Gregg, I am having big problem to make the Arduino Uno and the 128 x 64 OLED LCD communicating with each other. Late's say, the connection are donr correctly but the sketch is working properly. I have copied the free sketch from Youtube but I must have done something wrong when uploading the code. I am try to make a mini oscilloscope that shows frequencies but so far I haven't obtain major result. Have you got a sketch that make the Oled LCD running? It will be great if you can help me with this!!

Best

Angelo

Hi Angelo, it would probably work best if you start your own thread, show your circuit and code. That way people who can help you will.

My bad boards were from banggood, but they were faulty due to user error (me). In my effort to get them working, I tried different pin combos which killed the board. I received another 3 which work fine and have ordered another dozen.


Here is the I2C scan .ico.

Banggood’s come back with 0x3C, not 0x3D. Change it here . .

display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)

Here is my code. There are 4 buttons that drive several menus.

/*********************************************************************
  


This is an example for our Monochrome OLEDs based on SSD1306 drivers

  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/category/63_98

  This example is for a 128x64 size display using I2C to communicate
  3 pins are required to interface (2 I2C and one reset)

  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada  for Adafruit Industries.
  BSD license, check license.txt for more information
  All text above, and the splash screen must be included in any redistribution
*********************************************************************/

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

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);


#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH  16


const int btn2pin = 2;  // up  left
const int btn3pin = 3;  // lower leftt
const int btn4pin = 4;  // lower right
const int btnRtnpin = 5;// up right

int       btn2      = 0;
int       btn3      = 0;
int       btn4      = 0;
int       btnRtn    = 0;

int       lstBtn2   = 0;
int       lstBtn3   = 0;
int       lstBtn4   = 0;
int       lstBtnRtn = 0;

int       dspCur    = 0;

///////////////////////////////////////////////////

void setup()   {
  Serial.begin(9600);

  pinMode(btn2pin,    INPUT_PULLUP);
  pinMode(btn3pin,    INPUT_PULLUP);
  pinMode(btn4pin,    INPUT_PULLUP);
  pinMode(btnRtnpin,  INPUT_PULLUP);

  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)

  dspCur = 0;
  d00_Home ();

}

void loop() {
  //  Serial.println(btn2);

  btn2    = digitalRead(btn2pin);     // 1 = open, 0 = closed
  btn3    = digitalRead(btn3pin);
  btn4    = digitalRead(btn4pin);
  btnRtn  = digitalRead(btnRtnpin);

  if ((btnRtn == 0) && (lstBtnRtn == 1)) { //Return Home
    dspCur = 0;
    d00_Home();

    //  sceneNbr = 0;
    //   advanceRace(1, 0); // parm1 advance round amount   //**
  }

  if ((btn2 == 0) && (lstBtn2 == 1)) {  // d20_Race
    dspCur = 20;
    d20_Race();
  }


  if ((btn3 == 0) && (lstBtn3 == 1)) {  // d30_Test
    dspCur = 30;
    d30_Test();
  }


  if ((btn4 == 0) && (lstBtn4 == 1)) {  // d40_Setup
    dspCur = 40;
    d40_Setup();
  }
  lstBtn2   = btn2  ;
  lstBtn3   = btn3  ;
  lstBtn4   = btn4   ;
  lstBtnRtn = btnRtn ;
}

void d00_Home () {


  //     Serial.print("loop count : ");
  //     Serial.println(loopCnt);


  Serial.println("Home screen") ;
  display.clearDisplay();     // Clear the buffer.

  display.setTextSize(1);
  display.setTextColor(BLACK, WHITE);
  display.setCursor(0, 0);
  display.print(" H O M E       <--");

  display.setTextColor(WHITE);
  display.setCursor(0, 12);
  display.print("R A C E");

  display.setCursor(0, 24);
  display.print("T E S T    S E T U P");


  display.display();
}

void d20_Race () {

  Serial.println("d20_Race");

  display.clearDisplay();     // Clear the buffer.
  display.setTextSize(1);
  display.setTextColor(BLACK, WHITE);
  display.setCursor(0, 0);
  display.print(" R A C E   20  <--");

  display.setTextColor(WHITE);
  display.setCursor(0, 12);
  display.print("ROUND +");

  display.setCursor(0, 24);
  display.print("HEAT +   S T A R T");

  display.display();
}


void d30_Test () {

  Serial.println("d30_Test");

  display.clearDisplay();     // Clear the buffer.
  display.setTextSize(1);
  display.setTextColor(BLACK, WHITE);
  display.setCursor(0, 0);
  display.print(" T E S T   30  <--");

  display.setTextColor(WHITE);
  display.setCursor(0, 12);
  display.print("P A D S");

  display.setCursor(0, 24);
  display.print("C L O C K  S T A R T");

  display.display();
}


void d40_Setup () {

  Serial.println("d40_Setup");

  display.clearDisplay();     // Clear the buffer.
  display.setTextSize(1);
  display.setTextColor(BLACK, WHITE);
  display.setCursor(0, 0);
  display.print(" S E T U P   40  <--");

  display.setTextColor(WHITE);
  display.setCursor(0, 12);
  display.print("Heats");

  display.setCursor(0, 24);
  display.print("Pads");

  display.display();
}