Introduction: Interfacing OLED Display Using ArduinoUNO

Picture of Interfacing OLED Display Using ArduinoUNO

Holla!!

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

Picture of 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

Picture of 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

Picture of 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.

"U8glib_Arduino"

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() {

  u8g.firstPage();  
  
  /* Keep looping until finished drawing screen */
  do 
  {
    
   u8g.setFont(u8g_font_osb18);
   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

Picture of 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.

Comments

About This Instructable

601views

20favorites

License:

Bio: I'm a cool Techie girl.
More by kavyamaniyan13:Egg Half BoilMinion Money Bank - Make the Way You LikeStuffed Bread Roll - Who's Hungry
Add instructable to: