The I2C IIC Serial OLED LCD Screen is a compact display module designed for use in embedded systems. Manufactured in China, this module leverages OLED (Organic Light Emitting Diode) technology to deliver high contrast, low power consumption, and excellent visibility. It communicates via the I2C (Inter-Integrated Circuit) protocol, making it easy to interface with microcontrollers such as Arduino, Raspberry Pi, and other development boards.
Below are the key technical details of the I2C IIC Serial OLED LCD Screen:
Parameter | Value |
---|---|
Display Type | OLED |
Resolution | 128x64 pixels |
Communication Protocol | I2C (Inter-Integrated Circuit) |
Operating Voltage | 3.3V - 5V |
Current Consumption | ~20mA (varies with usage) |
Screen Size | 0.96 inches (diagonal) |
Viewing Angle | >160° |
Operating Temperature | -40°C to +85°C |
Driver IC | SSD1306 |
The module typically has a 4-pin interface for I2C communication. The pinout is as follows:
Pin | Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VCC | Power supply (3.3V or 5V) |
3 | SCL | I2C clock line (connect to microcontroller SCL pin) |
4 | SDA | I2C data line (connect to microcontroller SDA pin) |
Connect the Pins:
GND
pin to the ground of your microcontroller.VCC
pin to the 3.3V or 5V power supply of your microcontroller.SCL
pin to the I2C clock line (SCL) of your microcontroller.SDA
pin to the I2C data line (SDA) of your microcontroller.Install Required Libraries:
Adafruit_GFX
and Adafruit_SSD1306
libraries from the Arduino Library Manager.Write and Upload Code:
#include <Wire.h> // Include the Wire library for I2C
#include <Adafruit_GFX.h> // Include the Adafruit GFX library
#include <Adafruit_SSD1306.h> // Include the Adafruit SSD1306 library
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for SSD1306 display connected using I2C
#define OLED_RESET -1 // Reset pin (not used with I2C)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
// Initialize the display
if (!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
// Address 0x3C is the default for most SSD1306 modules
Serial.println(F("SSD1306 allocation failed"));
for (;;); // Don't proceed, loop forever
}
display.clearDisplay(); // Clear the buffer
display.setTextSize(1); // Set text size to 1 (smallest)
display.setTextColor(SSD1306_WHITE); // Set text color to white
display.setCursor(0, 0); // Set cursor to top-left corner
display.println(F("Hello, OLED!")); // Print text to the display
display.display(); // Display the text
}
void loop() {
// Nothing to do here
}
0x3C
but may vary depending on the module.SCL
and SDA
lines if your microcontroller does not have internal pull-ups.The screen does not turn on:
GND
and VCC
) and ensure the correct voltage is supplied.The display shows garbled or no text:
Adafruit_GFX
and Adafruit_SSD1306
libraries are correctly installed.SCL
and SDA
connections. Ensure they are connected to the correct pins on your microcontroller.The screen flickers or behaves erratically:
SCL
and SDA
lines if not already present.Q: Can I use this module with a 3.3V microcontroller?
A: Yes, the module supports both 3.3V and 5V logic levels.
Q: What is the maximum cable length for I2C communication?
A: The maximum length depends on the pull-up resistor values and the I2C clock speed. For standard setups, keep the cable length under 1 meter.
Q: Can I display images on this screen?
A: Yes, you can display monochrome bitmaps using the Adafruit_SSD1306
library.
Q: How do I change the I2C address of the module?
A: Some modules allow changing the address by soldering jumpers on the back. Refer to the module's datasheet for details.
By following this documentation, you can effectively integrate the I2C IIC Serial OLED LCD Screen into your projects and troubleshoot common issues.