OLED Display 1.3"
SH1106 Setup Guide
The 1.3" OLED delivers crisp blue-on-black output with a noticeably larger screen than the 0.96" model — connected over I2C with just 4 wires. Uses the SH1106 controller chip, which requires a different library than the common SSD1306.
Video walkthrough
Prefer to watch? These cover the same steps.
Community videos. Tishvi is not affiliated with creators.
About This Module
Key specifications at a glance.
The Tishvi 1.3" OLED is a self-emissive display — every pixel produces its own light, so there is no backlight. This gives true-black backgrounds and outstanding contrast. At 1.3 inches diagonal it is noticeably larger and more readable than the 0.96" OLED, while still connecting over the same 4-wire I2C bus.
SH1106 vs SSD1306 — What's the Difference?
Critical to understand before choosing your library.
The SSD1306 (used in the Tishvi 0.96" OLED) and SH1106 (this module) look almost identical on the outside. Many buyers try the Adafruit SSD1306 library first and are confused when the display shows a shifted or partially garbled image. Here's why:
| Property | SSD1306 (0.96" OLED) | SH1106 (this module — 1.3") |
|---|---|---|
| Screen size | 0.96 inch | 1.3 inch |
| Resolution | 128×64 | 128×64 |
| Internal RAM | 128×64 (exact match) | 132×64 (4 extra columns) |
| Correct library | Adafruit SSD1306 | U8g2 (recommended) |
| I2C address | 0x3C | 0x3C |
| Wiring | GND · VCC · SCL · SDA | GND · VCC · SCL · SDA |
| Symptom of wrong library | — | Image shifted right by 2 pixels, or partial display |
What You Need
Everything required for this guide.
Tishvi Arduino UNO R3
Must already be set up with Arduino IDE. See the UNO R3 Setup Guide first if needed.
Tishvi 1.3" OLED Display (SH1106, 4-pin I2C)
The module with pins labelled GND · VCC · SCL · SDA. Pre-configured at I2C address 0x3C — no hardware changes needed.
4× Jumper Wires (Female-to-Male)
Female end plugs into the OLED header pins. Male end into Arduino sockets.
USB-A to USB-B Cable + Computer with Arduino IDE
For uploading sketches. You'll install the U8g2 library via the Library Manager before your first upload.
Install the U8g2 Library
One library needed — must be installed before uploading any sketch.
Open Arduino IDE → Sketch → Include Library → Manage Libraries… (or press Ctrl+Shift+I)
Search for U8g2
Type U8g2 in the search box. Find the entry titled "U8g2" with the author listed as oliver.
Install it
Click Install. U8g2 has no additional dependencies — it is a complete self-contained library. No secondary install prompt will appear.
Verify installation
Go to Sketch → Include Library. You should see U8g2 listed. You're ready to wire up and upload.
#include <U8g2lib.h>, not <Adafruit_SSD1306.h>.Wiring to Arduino UNO R3 (I2C)
4 wires — identical to the 0.96" OLED.
| OLED Pin | Arduino UNO R3 Pin | Wire Colour | Notes |
|---|---|---|---|
| GND | GND | Black | Common ground |
| VCC | 5V | Red | Module accepts 3.3V–5V; Arduino 5V works fine |
| SCL | A5 | Green | I2C Clock — fixed to A5 on UNO R3 |
| SDA | A4 | Blue | I2C Data — fixed to A4 on UNO R3 |
Hello World Sketch
Your first text on the 1.3" OLED using U8g2.
Upload this sketch. It uses the U8g2 full-framebuffer mode — all drawing happens in RAM, then the entire buffer is pushed to the display in one call with u8g2.sendBuffer().
#include <Arduino.h> #include <U8g2lib.h> #include <Wire.h> // SH1106 · 128×64 · I2C · Full framebuffer U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); void setup() { u8g2.begin(); u8g2.clearBuffer(); // Draw border u8g2.drawFrame(0, 0, 128, 64); // Large title u8g2.setFont(u8g2_font_logisoso16_tr); u8g2.drawStr(22, 28, "TISHVI"); // Subtitle u8g2.setFont(u8g2_font_6x10_tr); u8g2.drawStr(14, 44, "1.3\" OLED Ready!"); u8g2.drawStr(10, 58, "guide.tishvi.com"); u8g2.sendBuffer(); // Push to display } void loop() { // Message stays — nothing in loop }
U8G2_SH1106_128X64_NONAME_F_HW_I2C — this long name encodes: chip=SH1106, size=128×64, variant=NONAME (generic module), buffer=F (full framebuffer), interface=HW_I2C (hardware I2C using A4/A5). Don't change this for the UNO R3 with this module.Uptime Counter Sketch
Live updating display — the basis for any sensor readout.
This sketch refreshes the display every second with a live HH:MM:SS uptime timer. The pattern — clearBuffer() → draw everything → sendBuffer() — is the foundation for displaying any live data.
#include <Arduino.h> #include <U8g2lib.h> #include <Wire.h> U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); void setup() { u8g2.begin(); } void loop() { unsigned long t = millis() / 1000; int h = t / 3600; int m = (t % 3600) / 60; int s = t % 60; char buf[9]; sprintf(buf, "%02d:%02d:%02d", h, m, s); u8g2.clearBuffer(); // Header u8g2.setFont(u8g2_font_6x10_tr); u8g2.drawStr(10, 10, "Tishvi SH1106 Demo"); u8g2.drawHLine(0, 13, 128); // Label u8g2.drawStr(0, 28, "Uptime:"); // Large time display u8g2.setFont(u8g2_font_logisoso16_tr); u8g2.drawStr(4, 50, buf); u8g2.sendBuffer(); delay(1000); }
u8g2.clearBuffer() at the start of each frame, make all your draw calls, then call u8g2.sendBuffer() once at the end. Unlike Adafruit's library, sendBuffer() does not clear the screen — it just transfers the current RAM buffer to the display.Troubleshooting
Screen blank or showing wrong output? Work through these in order.
Screen completely blank — no pixels lit
Check all 4 wires first: GND→GND, VCC→5V, SCL→A5, SDA→A4. A single missing wire will prevent the display from initialising. Then confirm you installed U8g2 by oliver — not a different library. Run an I2C scanner sketch (search "Arduino I2C scanner") to confirm the module is visible at address 0x3C.
Display shows a shifted or garbled image
You are using the wrong library — likely Adafruit SSD1306. Open Library Manager, install U8g2 by oliver, and change your sketch to use the U8G2_SH1106_128X64_NONAME_F_HW_I2C constructor. The SH1106 has 132 columns internally; only the U8g2 driver handles this correctly.
Compile error: U8g2lib.h not found
The library is not installed. Go to Sketch → Include Library → Manage Libraries, search U8g2, and install the entry by oliver. Restart Arduino IDE after installation if the error persists.
Compile error: U8G2_SH1106_128X64_NONAME_F_HW_I2C was not declared
The U8g2 library version you installed may be very old. Open Library Manager, find U8g2, and click Update to get the latest version. This constructor name has been stable since U8g2 v2.x.
I2C scanner finds no device (no address detected)
The module is not communicating. Check SDA and SCL are not swapped (SDA→A4, SCL→A5 on UNO R3). Confirm VCC is 5V — the module will not initialise on 3.3V from some sources. Check for bent or missing header pins on the module.
Display works once but freezes or goes blank after a few seconds
Power supply issue. If running from a laptop USB port, try a wall adapter instead. Also check there are no loose jumper wire connections — a wire partially seated can cause intermittent contact.
Running this alongside the 0.96" OLED — conflict on the I2C bus
Both modules default to address 0x3C and will conflict. To run both simultaneously, change one module's address to 0x3D by soldering the small address-select pad on the back of the PCB. Then use two separate U8g2 objects with different addresses in your sketch.
Text appears but is cut off on the right edge
Ensure you are using the correct constructor: U8G2_SH1106_128X64_NONAME_F_HW_I2C. Do not use U8G2_SSD1306_... — even though both say 128×64, the SSD1306 constructor will misalign the SH1106's output.
Download Sample Sketch
Get a ready-to-upload .ino file for the 1.3" SH1106 OLED.
The full sample sketch includes a welcome screen with border, a live HH:MM:SS uptime counter, multiple font sizes, separator lines, and detailed comments explaining every U8g2 function used. Requires the U8g2 library by oliver (see Step 4).
.ino file. The sketch will not compile if U8g2 is missing.Next Steps
Ideas for your 1.3" OLED project.
Display Sensor Data
Combine the HC-SR04 ultrasonic sensor with the 1.3" OLED — show live distance readings on the larger, more readable screen.
Tishvi 0.96" OLED
Smaller and uses the SSD1306 driver — different library but same I2C wiring. Good for compact builds where space is tight.
16×2 LCD I2C Display
Prefer a character display for text-heavy readouts? The 16×2 LCD with I2C uses the same A4/A5 pins and is ideal for menus and labels.