1.3-inch 4-pin I2C OLED Display Module (SH1306, 128x64 Pixels)
The 1.3-inch OLED display is a high-contrast, compact screen ideal for adding user interfaces, data readouts, or graphical feedback to your microcontroller projects. Featuring the SH1306 driver, this module offers a resolution of 128x64 pixels and produces bright, crisp visuals with deep blacks, as each pixel is self-illuminating and requires no backlight.
This specific model comes pre-soldered, allowing for immediate integration into your projects without the need for manual header installation. Its I2C (IIC) interface ensures simple, space-saving communication, requiring only four pins to operate.
Key Features
- Display Quality: 128x64 high-resolution display with a wide viewing angle and high contrast ratio.
- Driver IC: Uses the reliable SH1306 controller, widely supported by popular libraries.
- Compact & Low Power: Small 1.3-inch form factor that consumes very little power, perfect for battery-operated devices.
- Simple Interface: Uses the I2C protocol, keeping your wiring clean with only four connections (VCC, GND, SCL, SDA).
- Pre-Soldered: Equipped with a pre-soldered header for immediate use on breadboards or custom PCBs.
- Versatile Compatibility: Compatible with Arduino, Raspberry Pi, ESP32, ESP8266, and other popular development boards.
Technical Specifications
| Parameter | Detail |
| Screen Size | 1.3 inches |
| Resolution | 128 x 64 pixels |
| Driver IC | SH1306 |
| Interface | I2C / IIC |
| Supply Voltage | 3.3V – 5V DC |
| Viewing Angle | > 160° |
| Display Color | Usually Blue or White (depending on model) |
Typical Applications
- Smart Wearables: Creating readable interfaces for custom fitness trackers or watches.
- Project Monitoring: Displaying real-time sensor data from temperature, pressure, or air quality sensors.
- Menu Systems: Building navigation menus for hand-held control devices.
- Portable Instruments: Compact, high-visibility readouts for custom testing equipment.
What's in the box?
1 x 1.3inch OLED display
Resources
Using the 1.3-inch SH1306 OLED with a Raspberry Pi is a great way to provide a visual interface for your projects. Since it uses the I2C interface, the wiring is simple and identical to the sensor module we discussed earlier.
Wiring Guide
Ensure your Raspberry Pi is powered off before making these connections.
| OLED Pin | Raspberry Pi Pin (GPIO) |
| VCC | 3.3V (Pin 1) |
| GND | GND (Pin 6 or 9) |
| SCL | SCL (Pin 5) |
| SDA | SDA (Pin 3) |
Step-by-Step Setup
1. Enable I2C:
- If you haven't already, run
sudo raspi-config. - Navigate to Interface Options > I2C and enable it.
- Reboot the Pi.
2. Verify Detection:
- Run
i2cdetect -y 1. - You should see a hex address appear in the grid (typically
0x3c). This confirms the Pi is communicating with the display.
3. Install Python Libraries:
- The Luma.OLED library is the industry standard for driving these displays on Raspberry Pi.
- Install the dependencies:
sudo apt-get install python3-pip python3-dev libfreetype6-dev libjpeg-dev build-essential- Install the library:
sudo pip3 install luma.oled
4. Running a Demo:
- Luma includes a set of examples. You can navigate to their GitHub repository or run a simple test script to verify your display.
Important Tips
- Driver Configuration: Many tutorials online default to
ssd1306. If your display shows distorted images or shifted columns, you are likely using the wrong driver. Always double-check that your code initializes the device as ansh1306. - Power: While most of these modules are 5V tolerant, it is safer to use 3.3V to match the logic levels of the Raspberry Pi's GPIO pins.
- Refresh Rate: If you are planning to show animations, keep in mind that I2C is slower than SPI. For standard text and simple graphics, I2C will be perfectly responsive.