

The CH240L004A-PW by Shenzhen ChengHao Optoelectronic Co., Ltd. is a compact OLED display module with a resolution of 128x64 pixels. It utilizes an I2C interface, making it easy to integrate with microcontrollers and development boards like the Arduino UNO. The display is energy-efficient, offers high contrast, and provides excellent readability, even in low-light conditions. Its 4-pin connection simplifies wiring and reduces the risk of errors during setup.








| Parameter | Specification |
|---|---|
| Manufacturer | Shenzhen ChengHao Optoelectronic Co., Ltd. |
| Part ID | CH240L004A-PW |
| Display Type | OLED |
| Resolution | 128x64 pixels |
| Interface | I2C |
| Number of Pins | 4 |
| Operating Voltage | 3.3V - 5V |
| Operating Temperature | -40°C to +70°C |
| Dimensions | 2.42 inches (diagonal) |
| Power Consumption | Low (varies with usage) |
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | GND | Ground connection |
| 2 | VCC | Power supply (3.3V - 5V) |
| 3 | SCL | I2C clock line |
| 4 | SDA | I2C data line |
Wiring the Display:
Install Required Libraries:
Adafruit_GFX and Adafruit_SSD1306 libraries via the Arduino Library Manager.Upload Example Code: Use the following example code to display text on the OLED:
// Include necessary libraries
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// Define OLED display width and height
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
// Create an SSD1306 display object with I2C address 0x3C
#define OLED_RESET -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
void setup() {
// Initialize the 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();
// Set text size and color
display.setTextSize(1); // Small text size
display.setTextColor(SSD1306_WHITE);
// Display a message
display.setCursor(0, 0); // Set cursor to top-left corner
display.println(F("Hello, OLED!"));
display.display(); // Render the text on the screen
}
void loop() {
// Nothing to do here
}
0x3C) matches the address in your code.| Issue | Possible Cause | Solution |
|---|---|---|
| Display does not turn on | Incorrect wiring or loose connections | Double-check all connections and wiring. |
| No text or graphics on the screen | Incorrect I2C address in the code | Verify and update the I2C address in the code. |
| Flickering or unstable display | Insufficient power supply | Ensure a stable 3.3V or 5V power source. |
| Display is dim | Low contrast settings in the code | Adjust contrast settings in the library. |
Can I use this display with a 3.3V microcontroller?
What is the default I2C address of the display?
0x3C. Some variants may use 0x3D.Do I need external pull-up resistors for I2C?
Can I use this display with platforms other than Arduino?
By following this documentation, you can easily integrate the CH240L004A-PW OLED display into your projects and enjoy its high-quality visuals and ease of use.