The 0.91" I2C OLED display, manufactured by HZWDONE, is a small, high-contrast display module that uses the I2C communication protocol. It is commonly used for displaying text, graphics, and other information in embedded systems and microcontroller projects. This display is particularly popular in applications where space is limited, and a clear, readable output is required.
Parameter | Value |
---|---|
Display Type | OLED |
Screen Size | 0.91 inches |
Resolution | 128 x 32 pixels |
Communication | I2C |
Operating Voltage | 3.3V - 5V |
Operating Current | 20mA (typical) |
Viewing Angle | >160 degrees |
Operating Temperature | -40°C to 85°C |
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | VCC | Power Supply (3.3V - 5V) |
3 | SCL | I2C Clock Line |
4 | SDA | I2C Data Line |
Wiring the Display:
Programming the Display:
Adafruit_SSD1306
and Adafruit_GFX
libraries are commonly used.0x3C
. Verify this in the datasheet or by using an I2C scanner.#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// Define the screen dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
// Create an instance of the display
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
void setup() {
// Initialize the display
if(!display.begin(SSD1306_I2C_ADDRESS, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
// Clear the buffer
display.clearDisplay();
// Set text size and color
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Set cursor position
display.setCursor(0, 0);
// Display text
display.println(F("Hello, World!"));
// Update the display with the buffer content
display.display();
}
void loop() {
// Nothing to do here
}
Display Not Turning On:
No Display Output:
Flickering or Unstable Display:
Library Compatibility Issues:
Adafruit_SSD1306
and Adafruit_GFX
libraries.Q1: What is the default I2C address of the display?
0x3C
. However, it is recommended to verify this using an I2C scanner.Q2: Can I use this display with a 3.3V microcontroller?
Q3: How do I change the I2C address of the display?
Q4: What libraries are recommended for Arduino?
Adafruit_SSD1306
and Adafruit_GFX
libraries are highly recommended for interfacing with this display.By following this documentation, users should be able to effectively integrate and utilize the 0.91" I2C OLED display in their projects.