Oled Display Doesn't work

I have tried to start programming with the ssd1306 oled display but I can't get this to work.

Code:

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);

void setup() {  
  u8g.setFont(u8g_font_unifont);
  u8g.setColorIndex(1); 
}

void loop() {  
  u8g.firstPage();
  do {  
    draw();
  } while( u8g.nextPage() );
  delay(1000);   
}
  
void draw(){
  u8g.drawStr( 0, 20, "Hello World");
    
}

The code worked but the display would not display anything

You should first check that the display is seen on the I2C interface, so load an run an I2C Scanner.

It will tell you the address the display responds on.

Hi,
Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What model Arduino are you using?

Thanks.. Tom... :slight_smile:

Hi,
Have you tried the Adafruit examples?

Thanks.. Tom... :slight_smile:

TomGeorge:
Hi,
Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What model Arduino are you using?

Thanks.. Tom... :slight_smile:

I'm using the Arduino Uno Rev. 3

and yes I have tried the Adafruit exampel but I could find anything that is up to date

Maybe you can also sent a picture of your setup or at least the wiring of your OLED with the Uno.

BTW: U8glib is also old (although it should work in your example) and is replaced by u8g2.

Oliver

I am having problems sending the picture so this got to do meanwhile.

Arduino -> Oled display
SDA -> SDA
SCL -> SCL
GND -> GND
VIN -> VCC

so at the left is the Arduino outputs and at the right is the oled input, hopefuly you understand what i mean :slight_smile:

Looks good, but the OLED is still not working?

Oliver

DerpMannen:
I am having problems sending the picture so this got to do meanwhile.

Arduino → Oled display
SDA → SDA
SCL → SCL
GND → GND
VIN → VCC

so at the left is the Arduino outputs and at the right is the oled input, hopefuly you understand what i mean :slight_smile:

Why have you got the Arduino Vin pin connected to the VCC of the OLED ??

And what supply do you have connected to the power jack on the UNO, if its greater than 5V your display is very likley well fried ?

I have only been using usb as power to arduino and the usb port on the computer only let's out 5v and yes the oled is still not working

DerpMannen:
I have only been using usb as power to arduino and the usb port on the computer only let's out 5v and yes the oled is still not working

Fair enough, but what is the answer to the question I posed in #8 ?

Think about the answer and also why I asked the question.