Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use 0.96" OLED Dual Colour I2C Display: Examples, Pinouts, and Specs

Image of 0.96" OLED Dual Colour I2C DisplayDesign with 0.96" OLED Dual Colour I2C Display in Cirkit Designer

Introduction

The 0.96" OLED Dual Colour I2C Display is a compact and versatile display module designed for embedded systems. It features a 128x64 pixel resolution and supports dual-color output, typically yellow for the top portion and blue for the bottom. This display uses OLED (Organic Light Emitting Diode) technology, which provides high contrast, wide viewing angles, and low power consumption. Communication is handled via the I2C interface, making it easy to integrate with microcontrollers such as Arduino, Raspberry Pi, and others.

Explore Projects Built with 0.96" OLED Dual Colour I2C Display

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32-Powered OLED Display Interface: A project utilizing 0.96" OLED Dual Colour I2C Display in a practical application
ESP32-Powered OLED Display Interface

This circuit connects an ESP32 microcontroller to a 0.96" OLED display via I2C communication protocol. The ESP32's pins D22 and D21 are used as the serial clock (SCK) and serial data (SDA) lines, respectively, to interface with the OLED's corresponding SCK and SDA pins. The OLED is powered by the 3.3V output from the ESP32, and both devices share a common ground. The embedded code initializes the display and prints 'Hello, ESP32!' on the screen.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

Parameter Value
Display Type OLED
Screen Size 0.96 inches
Resolution 128x64 pixels
Color Output Dual color (Yellow and Blue)
Interface I2C
Operating Voltage 3.3V - 5V
Current Consumption ~20mA (varies with brightness)
Viewing Angle >160°
Operating Temperature -40°C to +85°C
Dimensions 27mm x 27mm x 4mm

Pin Configuration

Pin Name Description
1 GND Ground connection
2 VCC Power supply (3.3V or 5V)
3 SCL I2C Clock Line
4 SDA I2C Data Line

Usage Instructions

Connecting the Display to an Arduino UNO

To use the 0.96" OLED Dual Colour I2C Display with an Arduino UNO, follow these steps:

  1. Wiring:

    • Connect the GND pin of the display to the GND pin on the Arduino.
    • Connect the VCC pin of the display to the 5V pin on the Arduino.
    • Connect the SCL pin of the display to the A5 pin on the Arduino (I2C clock line).
    • Connect the SDA pin of the display to the A4 pin on the Arduino (I2C data line).
  2. Install Required Libraries:

    • Open the Arduino IDE.
    • Go to Sketch > Include Library > Manage Libraries.
    • Search for and install the following libraries:
      • Adafruit GFX Library
      • Adafruit SSD1306
  3. Upload Example Code: Use the following example code to display text on the OLED:

    // Include necessary libraries
    #include <Wire.h>
    #include <Adafruit_GFX.h>
    #include <Adafruit_SSD1306.h>
    
    // Define the OLED display width and height
    #define SCREEN_WIDTH 128
    #define SCREEN_HEIGHT 64
    
    // Create an SSD1306 display object
    Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
    
    void setup() {
      // Initialize the display
      if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
        // Display initialization failed
        Serial.println(F("SSD1306 allocation failed"));
        for (;;); // Halt execution
      }
    
      // Clear the display buffer
      display.clearDisplay();
    
      // Set text size and color
      display.setTextSize(1); // Small text size
      display.setTextColor(SSD1306_WHITE);
    
      // Display text
      display.setCursor(0, 0); // Set cursor to top-left corner
      display.println(F("Hello, OLED!"));
      display.println(F("Dual Color Display"));
      display.display(); // Render the text on the screen
    }
    
    void loop() {
      // Nothing to do here
    }
    

Important Considerations

Troubleshooting and FAQs

Common Issues

  1. The display does not turn on:

    • Verify the wiring connections, especially GND and VCC.
    • Ensure the power supply voltage matches the display's requirements.
    • Check if the I2C address is correct in the code.
  2. Text or graphics are not displayed:

    • Confirm that the required libraries (Adafruit GFX and Adafruit SSD1306) are installed.
    • Ensure the I2C pins (SCL and SDA) are correctly connected to the Arduino.
  3. Flickering or unstable display:

    • Check for loose connections in the wiring.
    • Reduce the I2C clock speed in the Arduino code if necessary.

FAQs

By following this documentation, you can effectively integrate and use the 0.96" OLED Dual Colour I2C Display in your projects.