Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use OLED Display: 0.97-inch I2C: Examples, Pinouts, and Specs

Image of OLED Display: 0.97-inch I2C
Cirkit Designer LogoDesign with OLED Display: 0.97-inch I2C in Cirkit Designer

Introduction

The 0.97-inch OLED Display is a compact, low-power display module that utilizes organic light-emitting diodes (OLEDs) to produce bright, high-contrast images. This display is ideal for applications requiring clear visuals in a small form factor. It communicates via the I2C interface, making it easy to integrate with microcontrollers such as Arduino, Raspberry Pi, and other development boards.

Explore Projects Built with OLED Display: 0.97-inch I2C

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
IoT Board with 0.96" OLED Display for Real-Time Data Visualization
Image of dgd: A project utilizing OLED Display: 0.97-inch I2C in a practical application
This circuit connects a 0.96" OLED display to an IoT board. The OLED display is powered by the 3.3V and GND pins of the IoT board, and communicates with the board via I2C using the SDA and SCL pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino 101 OLED Display Animation Project
Image of wokwi animater test: A project utilizing OLED Display: 0.97-inch I2C in a practical application
This circuit consists of an Arduino 101 microcontroller connected to a 0.96" OLED display via I2C communication. The Arduino runs a program that initializes the OLED and continuously displays an animated sequence of frames on the screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and OLED Display for Real-Time Data Visualization
Image of OLED Display: A project utilizing OLED Display: 0.97-inch I2C in a practical application
This circuit consists of an Arduino Nano microcontroller connected to a 0.96" OLED display. The Arduino Nano provides power to the OLED display and communicates with it using the I2C protocol via the A4 (SDA) and A5 (SCK) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based OLED Display with Dual Pushbutton Control
Image of pong game: A project utilizing OLED Display: 0.97-inch I2C in a practical application
This circuit features an Arduino UNO microcontroller interfaced with a 0.96" OLED display and two pushbuttons. The OLED display is connected to the Arduino via the I2C protocol (SCK to A5 and SDA to A4), while the pushbuttons are connected to digital pins D2 and D3 for user input. The setup is likely intended for a simple interactive display application.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with OLED Display: 0.97-inch I2C

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 dgd: A project utilizing OLED Display: 0.97-inch I2C in a practical application
IoT Board with 0.96" OLED Display for Real-Time Data Visualization
This circuit connects a 0.96" OLED display to an IoT board. The OLED display is powered by the 3.3V and GND pins of the IoT board, and communicates with the board via I2C using the SDA and SCL pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of wokwi animater test: A project utilizing OLED Display: 0.97-inch I2C in a practical application
Arduino 101 OLED Display Animation Project
This circuit consists of an Arduino 101 microcontroller connected to a 0.96" OLED display via I2C communication. The Arduino runs a program that initializes the OLED and continuously displays an animated sequence of frames on the screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of OLED Display: A project utilizing OLED Display: 0.97-inch I2C in a practical application
Arduino Nano and OLED Display for Real-Time Data Visualization
This circuit consists of an Arduino Nano microcontroller connected to a 0.96" OLED display. The Arduino Nano provides power to the OLED display and communicates with it using the I2C protocol via the A4 (SDA) and A5 (SCK) pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pong game: A project utilizing OLED Display: 0.97-inch I2C in a practical application
Arduino UNO-Based OLED Display with Dual Pushbutton Control
This circuit features an Arduino UNO microcontroller interfaced with a 0.96" OLED display and two pushbuttons. The OLED display is connected to the Arduino via the I2C protocol (SCK to A5 and SDA to A4), while the pushbuttons are connected to digital pins D2 and D3 for user input. The setup is likely intended for a simple interactive display application.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Wearable devices
  • IoT dashboards and indicators
  • Portable electronics
  • Sensor data visualization
  • Compact user interfaces for embedded systems

Technical Specifications

The following table outlines the key technical details of the 0.97-inch OLED Display:

Parameter Specification
Display Type OLED
Screen Size 0.97 inches
Resolution 128 x 64 pixels
Interface I2C
Operating Voltage 3.3V - 5V
Operating Current ~20mA
Viewing Angle >160°
Contrast Ratio 2000:1
Operating Temperature -40°C to +85°C
Dimensions 27mm x 27mm x 4mm

Pin Configuration and Descriptions

The OLED Display module typically has a 4-pin interface for I2C communication. The pinout is as follows:

Pin Name Description Notes
VCC Power Supply (3.3V - 5V) Connect to the microcontroller's power pin.
GND Ground Connect to the ground of the circuit.
SCL Serial Clock Line Connect to the I2C clock pin (e.g., A5 on Arduino UNO).
SDA Serial Data Line Connect to the I2C data pin (e.g., A4 on Arduino UNO).

Usage Instructions

How to Use the Component in a Circuit

  1. Connect the Pins:

    • Connect the VCC pin to the 3.3V or 5V power supply of your microcontroller.
    • Connect the GND pin to the ground of your circuit.
    • Connect the SCL pin to the I2C clock pin of your microcontroller (e.g., A5 on Arduino UNO).
    • Connect the SDA pin to the I2C data pin of your microcontroller (e.g., A4 on Arduino UNO).
  2. Install Required Libraries:

    • For Arduino, install the Adafruit_GFX and Adafruit_SSD1306 libraries from the Arduino Library Manager.
  3. Write and Upload Code:

    • Use the example code below to display text or graphics on the OLED screen.

Example Code for Arduino UNO

#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 instance of the SSD1306 display object
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {
  // Initialize serial communication for debugging
  Serial.begin(9600);

  // Initialize the OLED display
  if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
    // If initialization fails, print an error message
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Halt the program
  }

  // Clear the display buffer
  display.clearDisplay();

  // Set text size and color
  display.setTextSize(1); // Small text size
  display.setTextColor(SSD1306_WHITE);

  // Display a message
  display.setCursor(0, 0); // Set cursor to top-left corner
  display.println(F("Hello, OLED!"));
  display.display(); // Render the text on the screen
}

void loop() {
  // No actions in the loop for this example
}

Important Considerations and Best Practices

  • Ensure the I2C address of the OLED display matches the address in your code. The default address is typically 0x3C.
  • Use pull-up resistors (4.7kΩ to 10kΩ) on the SCL and SDA lines if your microcontroller does not have internal pull-ups.
  • Avoid exposing the display to direct sunlight for prolonged periods, as this may degrade the OLED material.
  • Handle the module carefully to avoid damaging the fragile display surface.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The display does not turn on:

    • Verify the power connections (VCC and GND) and ensure the correct voltage is supplied.
    • Check the I2C connections (SCL and SDA) and ensure they are properly connected to the microcontroller.
  2. Nothing is displayed on the screen:

    • Confirm that the I2C address in your code matches the display's address (default is 0x3C).
    • Ensure the required libraries (Adafruit_GFX and Adafruit_SSD1306) are installed and up to date.
  3. Flickering or unstable display:

    • Check for loose connections in the circuit.
    • Use shorter wires to reduce noise in the I2C communication.
  4. Text or graphics appear distorted:

    • Ensure the correct resolution (128x64) is set in your code.
    • Clear the display buffer (display.clearDisplay()) before rendering new content.

FAQs

Q: Can I use this display with a 3.3V microcontroller?
A: Yes, the OLED display supports both 3.3V and 5V logic levels, making it compatible with a wide range of microcontrollers.

Q: How do I change the I2C address of the display?
A: Some OLED modules allow changing the I2C address by soldering jumpers on the back of the module. Refer to the module's datasheet for details.

Q: Can I display images on this OLED screen?
A: Yes, you can display images by converting them into a bitmap format and using the drawBitmap() function provided by the Adafruit_GFX library.

Q: What is the lifespan of the OLED display?
A: The typical lifespan of an OLED display is around 10,000 to 50,000 hours, depending on usage and brightness settings.