OLED Animation Maker OLED Maker

SH1106 vs SSD1306: Which OLED for Animations?

Side-by-side technical drawing of two 0.96 inch OLED displays comparing the SSD1306 and SH1106 display driver controllers

Picture this: you buy a 0.96-inch OLED display, wire it up exactly like the tutorial says, upload your code, and... the image is shifted two pixels to the right with a weird sliver cut off on the edge. You triple-check your wiring. You re-read the code. Everything looks correct. What's going on? Welcome to the SH1106 vs SSD1306 confusion—a trap that catches almost every maker at some point. It got me good when I bought a batch of cheap displays online.

Here's the deal: tons of 128×64 OLED modules look completely identical on the outside. Same size, same pins, same blue glow. But inside, they use one of two different controller chips—the SSD1306 or the SH1106. And if you tell your code the wrong one, your graphics end up shifted or cut off. It's not your wiring, it's not your code logic—it's a mismatch between the chip and the software driver.

In this guide, I'll explain the difference between these two controllers, why the SH1106 causes that annoying offset, how to tell which one you have, and how to fix the shift in your code. By the end, you'll never be confused by a misaligned OLED again. This is honestly one of the most useful things to understand if you work with cheap OLED displays.

Quick comparison: SSD1306 vs SH1106 at a glance

Before we get into the details, here's the side-by-side breakdown of how these two controllers compare:

Feature SSD1306 SH1106
Common on Adafruit modules, 0.96" blue displays Cheaper clones, 1.3" displays
Internal columns 128 (matches visible area) 132 (visible area offset by 2)
Visible resolution 128×64 128×64
Interface I²C / SPI I²C / SPI
Typical I²C address 0x3C 0x3C
Library examples online Tons (most tutorials use this) Fewer, but well-supported

Notice that almost everything is the same—same resolution, same interface, same address. The one critical difference is those internal columns, and that's exactly what causes the famous offset issue.

Why the SH1106 causes that annoying 2-pixel offset

Technical comparative chart showing SSD1306 correct centering versus SH1106 2-pixel column alignment shift

Here's the root cause, explained simply. The SSD1306 controller has exactly 128 columns of memory, and they map directly to the 128 pixels you see. Pixel 0 in memory is pixel 0 on screen. Clean and straightforward.

The SH1106, however, was designed with 132 columns of internal memory. But the visible screen is still only 128 pixels wide. So the display is "centered" within that 132-column memory—meaning the visible area actually starts at column 2, not column 0. Columns 0 and 1 (and 130, 131) exist in memory but aren't shown.

So when you run SSD1306 code on an SH1106, your code writes starting at column 0, but the SH1106 displays starting at column 2. The result? Your entire image shifts 2 pixels left in memory terms, which shows up as a 2-pixel gap on one side and content cut off on the other. It's subtle but really noticeable, especially with text or anything touching the screen edges.

How to fix the SH1106 offset

Good news—the fix is easy once you know the cause. You've got two options:

  1. Use an SH1106-specific library or setting: Libraries like U8g2 let you specify SH1106, and they handle the offset automatically. If you use the OLED animation maker, just select SH1106 from the display dropdown before generating code, and the correct offset is baked in.
  2. Manually add a 2-pixel X offset: If you're hand-coding, just add 2 to all your X coordinates. So drawBitmap(0, 0, ...) becomes drawBitmap(2, 0, ...). A bit tedious for complex graphics, but it works.

I strongly recommend the first option. Manually adding offsets everywhere is error-prone and a pain to maintain. Let the library or tool handle it.

How do I know which controller I have?

This is the million-dollar question, since the displays look identical. Here are the ways to figure it out, from easiest to most reliable:

  • Check the listing/datasheet: If you still have the product page or packaging, it usually states SSD1306 or SH1106. The 1.3-inch displays are more often SH1106; the 0.96-inch ones are more often SSD1306.
  • Just test it: Upload SSD1306 code. If the image is perfectly aligned, you have an SSD1306. If it's shifted 2 pixels with a gap on one edge, you have an SH1106. This is honestly how I figure it out most of the time.
  • Look at the size: 1.3-inch modules are very commonly SH1106. 0.96-inch modules are usually SSD1306, but not always—the cheap clones can be either.

Pro tip: If you bought a multi-pack of "identical" displays, test each one. I once had a pack of five where four were SSD1306 and one was SH1106. That oddball drove me crazy until I realized they weren't all the same chip!

Which one should you buy?

If you're shopping for a new display, here's my honest take:

Go with SSD1306 if you're a beginner or you follow a lot of Adafruit tutorials. The vast majority of online examples, libraries, and guides assume SSD1306. You'll hit fewer "why doesn't this work" moments because everything just matches.

SH1106 is totally fine if you already own some, or if you want a 1.3-inch display (which are commonly SH1106). The animation quality, frame rate, and capabilities are identical to SSD1306. You just need to make sure your code targets SH1106. Don't avoid a good deal on SH1106 displays just because of the offset—it's a non-issue once you know about it.

Creating animations for both controllers

Here's the reassuring part: the actual animation work is identical for both. The frame data (those PROGMEM bitmap arrays) is exactly the same whether you're targeting SSD1306 or SH1106. The only things that change are the initialization code and the X coordinate offset.

This means you can design your animation once, then just flip the display type in the dropdown before clicking "Get the Code." The tool regenerates with the correct driver and offset. I've reused the same animations across both display types without redrawing a single frame.

Export for SSD1306 or SH1106

Free tool — correct offsets, templates, GIF import.

Open OLED Animation Maker →

Popular searches: sh1106 vs ssd1306 · sh1106 oled animation · sh1106 arduino tutorial · 0.96 oled controller · ssd1306 128x64

Frequently asked questions

Is SH1106 better than SSD1306?

Neither is "better"—they're nearly identical in capability and image quality. SSD1306 has more online tutorials and examples, making it easier for beginners. SH1106 is common on 1.3-inch displays and works just as well once your code targets it correctly.

Can I use the Adafruit SSD1306 library with an SH1106 display?

Not directly—you'll get the 2-pixel offset issue. For SH1106, use a library that supports it (like U8g2 or Adafruit SH110X) or manually add a 2-pixel X offset to your coordinates. The U8g2 library handles both controllers cleanly.

Why is my OLED display shifted to one side?

You almost certainly have an SH1106 display but are using SSD1306 code. The SH1106 has 132 internal columns with the visible area starting at column 2, causing the shift. Switch to SH1106 in your code or tool to fix it.

Do SH1106 and SSD1306 use the same wiring?

Yes, completely. Both use the same I²C pins (SDA, SCL), same power requirements, and usually the same address (0x3C). The only difference is in the software driver, not the hardware connections.

Related