The SSD1306 I2C OLED Display, manufactured by MYOSA, is a small, low-power display module that uses the I2C communication protocol. It is commonly used for displaying text and graphics in embedded systems and microcontroller projects. This versatile display is ideal for applications where space and power consumption are critical, such as wearable devices, portable electronics, and various DIY projects.
Parameter | Value |
---|---|
Display Type | OLED |
Resolution | 128 x 64 pixels |
Communication | I2C |
Operating Voltage | 3.3V - 5V |
Current Consumption | 20mA (typical) |
Viewing Angle | >160° |
Operating Temperature | -40°C to 85°C |
Dimensions | 27.0mm x 27.0mm x 4.1mm |
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 |
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// Define the screen dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
// 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(;;);
}
display.display();
delay(2000); // Pause for 2 seconds
// Clear the buffer
display.clearDisplay();
// Display text
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("Hello, world!"));
display.display();
}
void loop() {
// Add your main code here, to run repeatedly
}
Display Not Turning On:
No Display Output:
Flickering or Unstable Display:
By following this documentation, users should be able to effectively integrate and utilize the SSD1306 I2C OLED Display in their projects. Whether you are a beginner or an experienced user, this guide provides the necessary information to get started and troubleshoot common issues.