The 1.3 Inch OLED Display is a small, high-resolution organic light-emitting diode display designed for use in embedded systems and portable devices. It offers excellent contrast, wide viewing angles, and low power consumption, making it ideal for displaying graphics, text, and animations in compact electronic projects. This display is commonly used in applications such as IoT devices, wearables, handheld instruments, and DIY electronics projects.
Below are the key technical details and pin configuration for the 1.3 Inch OLED Display:
Parameter | Specification |
---|---|
Display Type | OLED (Organic Light-Emitting Diode) |
Screen Size | 1.3 inches |
Resolution | 128 x 64 pixels |
Interface | I2C or SPI (depending on model) |
Operating Voltage | 3.3V to 5V |
Operating Current | ~20mA (typical) |
Viewing Angle | >160° |
Contrast Ratio | 2000:1 |
Driver IC | SSD1306 |
Operating Temperature | -40°C to +85°C |
The 1.3 Inch OLED Display typically has a 4-pin or 7-pin interface, depending on the communication protocol (I2C or SPI). Below is the pinout for the I2C version:
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground (0V reference) |
2 | VCC | Power supply (3.3V or 5V) |
3 | SCL | Serial Clock Line (I2C clock input) |
4 | SDA | Serial Data Line (I2C data input/output) |
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground (0V reference) |
2 | VCC | Power supply (3.3V or 5V) |
3 | SCK | Serial Clock (SPI clock input) |
4 | MOSI | Master Out Slave In (SPI data input) |
5 | RES | Reset (active low) |
6 | DC | Data/Command control |
7 | CS | Chip Select (active low) |
VCC
pin to a 3.3V or 5V power source and the GND
pin to ground.SCL
and SDA
pins to the corresponding I2C pins on your microcontroller.SCK
, MOSI
, RES
, DC
, and CS
to the appropriate SPI pins on your microcontroller.SCL
and SDA
lines.Below is an example of how to use the 1.3 Inch OLED Display with an Arduino UNO using the Adafruit SSD1306 library:
// Include necessary libraries
#include <Wire.h> // For I2C communication
#include <Adafruit_GFX.h> // Graphics library
#include <Adafruit_SSD1306.h> // OLED driver library
// Define OLED display dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
// Create an SSD1306 display object (I2C address 0x3C is common)
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)) {
Serial.println(F("SSD1306 allocation failed"));
for (;;); // Halt execution if initialization fails
}
// Clear the display buffer
display.clearDisplay();
// Display a welcome message
display.setTextSize(1); // Set text size (1 = small, 2 = medium, etc.)
display.setTextColor(SSD1306_WHITE); // Set text color
display.setCursor(0, 0); // Set cursor position
display.println(F("Hello, OLED!")); // Print text to the buffer
display.display(); // Send buffer to the display
delay(2000); // Wait for 2 seconds
}
void loop() {
// Example: Draw a rectangle
display.clearDisplay(); // Clear the display buffer
display.drawRect(10, 10, 50, 30, SSD1306_WHITE); // Draw a rectangle
display.display(); // Send buffer to the display
delay(1000); // Wait for 1 second
}
0x3C
or 0x3D
. Check your display's documentation or use an I2C scanner to confirm.Display Not Turning On:
VCC
and GND
).No Output on the Display:
0x3C
or 0x3D
).Flickering or Unstable Display:
Library Errors During Compilation:
Q: Can I use this display with a Raspberry Pi?
A: Yes, the display is compatible with Raspberry Pi. Use the I2C or SPI interface and appropriate libraries like luma.oled
.
Q: What is the maximum refresh rate of the display?
A: The refresh rate depends on the driver IC (SSD1306) and the communication speed. Typically, it supports up to 60Hz.
Q: Can I daisy-chain multiple displays?
A: For I2C, you can connect multiple displays by assigning unique addresses. For SPI, each display requires a separate CS
pin.
By following this documentation, you can effectively integrate the 1.3 Inch OLED Display into your projects and troubleshoot common issues with ease.