The OLED 1.3" display module by abc, part ID xyz, is a compact and high-contrast display unit that utilizes organic light-emitting diode technology. This technology allows for sharp and bright visuals even in low-light conditions. Common applications include wearable devices, small-screen consumer gadgets, and DIY projects with microcontrollers like the Arduino UNO.
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground connection |
2 | VCC | Power supply (3.3V - 5V) |
3 | SCL | Serial Clock Line for I2C interface |
4 | SDA | Serial Data Line for I2C interface |
5 | RES | Reset pin (optional, active low) |
6 | DC | Data/Command control pin (optional) |
Power Connections:
Data Connections:
Optional Pins:
To control the OLED display, you will need to include libraries that support the SSD1306 driver. The Adafruit SSD1306 library is a common choice.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SCL, SDA pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);
void setup() {
// Initialize with the I2C addr 0x3C (for the 128x64)
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
// Clear the buffer
display.clearDisplay();
// Draw a single pixel in white
display.drawPixel(10, 10, WHITE);
// Display the image buffer on the screen
display.display();
}
void loop() {
// Code to update the display continuously
}
Q: Can I use this display with a 5V system? A: Yes, the OLED display is typically 5V tolerant, but always check the datasheet for your specific module.
Q: How do I adjust the brightness of the display? A: Brightness can be controlled through software commands using the display library.
Q: What library should I use for the Arduino? A: The Adafruit SSD1306 library is recommended for its ease of use and compatibility with the Arduino.
For further assistance, consult the manufacturer's datasheet and technical forums for the specific OLED module you are using.