Interfacing OLED Display Using ArduinoUNO

Introduction: Interfacing OLED Display Using ArduinoUNO

About: I'm a cool Techie girl.


This is my first Instructable on electronics.

In this instructable, we will learn how toInterface OLED Display with Arduino UNO.

Let's begin!

Step 1: Components Required

Here is the list of components required to get started with the Instructable,

Hardware Components

  • Arduino Uno
  • 0.96” SSD1306 OLED
  • Bread Board
  • Jumper Wires
  • Micro USB Cable

Software Components

  • Arduino IDE

Step 2: Description

OLED (Organic Light Emitting Diodes) is a flat light emitting technology, made by placing a series of organic thin films between two conductors.

When electrical current is applied, a bright light is emitted. OLEDs can be used to make displays and lighting. Because OLEDs emit light they do not require a backlight and so are thinner and more efficient than LCD displays(which do require a white backlight).

Step 3: Connection

Create an instance for the SSD1306 OLED display in SPI mode

Connection scheme:

  • CS pin of the OLED is connected to Digital Pin 8 of the ArduinoUNO.
  • DC of the OLED is connected to Digital Pin 9 of the ArduinoUNO.
  • Reset of the OLED is connected to Digital Pin 10 of the ArduinoUNO.
  • SDA of the OLED is connected to Digital Pin 11 of the ArduinoUNO.
  • SCK of the OLED is connected to Digital Pin 12 of the ArduinoUNO.
  • VDD of the OLED is connected to Digital 5v of the ArduinoUNO.
  • GND of the OLED is connected to ground (GND) pin of the ArduinoUNO.

Step 4: Library Setup

OLED can be easily coded with a library file called Ug8lib. Ug8lib is a graphics library which supports many different monochrome displays.

The library file can be downloaded by following steps

1. Go to > Sketch

2. Include Library

3. Manage Library

4. Download U8g lib library file

Or you can download from the link attached below.


Step 5: CODE

/* SCK = 12
   SDA = 11
   CS = 8
   DC = 9
   RES = 10
U8GLIB_SSD1306_128X64 u8g(12, 11, 8, 9, 10);
void setup() {
/* nothing to do here */
void loop() {

  /* Keep looping until finished drawing screen */
   u8g.drawStr(30, 20, "Hello"); // (horizontal spacing,vertical spacing,"string")
   u8g.drawStr(20, 50, "Makers!");      
  } while(u8g.nextPage());   

You can also download the code attached below. Open the sketch and upload the code.

Step 6: OUTPUT

You can also make some animations and tinker with the code as per your requirement,

Thank YOU!!

Let's meet with another cool Instructable.



    • Fix It! Contest

      Fix It! Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Tiny Home Contest

      Tiny Home Contest

    2 Discussions

    what do i need to do if i use a 128*128 TFT display?


    8 months ago

    THANK YOU, THANK YOU, THANK YOU. I have spent the better part of a day trying to get my OLEDs to work and your instructable is the only one that has worked. I'm trying to make the instructable listed below for my nephew. I', not sure how to merge the two of these but at least I know my screen works.