OLED Animation Maker OLED Maker
↔️ Scroll · Text

SSD1306 Scrolling Text on Arduino, When Name Animation Wins

Almost every SSD1306 tutorial shows scrolling text. I still use it for status lines, but for a name intro or a logo splash I switched to frame animation. Here's the honest split, and you can decide where your project lands. I don't think there's one right answer.

By Ashish Sep 29, 2026 ~26 min Text effects, SSD1306
⬅️

Hardware scroll

It's startscrollleft: a tiny sketch, but you get a limited look.

📜

Software ticker

You move the cursor each frame, so long text works.

✨

Assemble intro

Pixels build the name, but you'll pay in flash.

🧠

Pick by job

Your status line isn't your boot splash.

Pixel art of an OLED screen with scrolling text blocks and motion lines, for the post SSD1306 Scrolling Text on Arduino, When Name Animation Wins

Almost every SSD1306 tutorial shows scrolling text. Adafruit even ships startscrollleft() / startscrollright() in the library. It's useful. But you've seen the same effect on a cheap clock from 2014.

Assemble Studio typing the name ASHISH with a live SSD1306 OLED preview and 60+ assemble styles

I still use hardware scroll for status lines and long sensor strings. For a name intro or a logo splash, I stopped. I'll walk you through all three approaches with real code, then give you a simple decision rule so you don't waste flash on the wrong effect.

What you need before any of this works

  • A working I²C OLED, where your Hello World already shows text
  • Adafruit SSD1306 + GFX, or U8g2, installed on your machine
  • Your address, either 0x3C or 0x3D

If you haven't got Hello World running yet, start here: Arduino OLED I2C tutorial.

Method 1, Hardware scroll

The SSD1306 can shift its own RAM. Your MCU prints once, then you ask the chip to scroll.

display.clearDisplay();
display.setTextSize(2);
display.setCursor(0, 20);
display.print("HELLO");
display.display();
display.startscrollleft(0x00, 0x0F);
delay(4000);
display.stopscroll();

Pros: it's almost no CPU work, a tiny sketch, and it works on Uno. Cons: you scroll whatever's already on the glass. You can't make letters fall from the top or assemble from random pixels. The speed options are coarse, and you can't fine-tune them. Diagonal helpers exist, but it still feels like the whole framebuffer is sliding.

The page arguments (0x00, 0x0F) pick which horizontal bands scroll, and they're easy to get wrong. Wrong values make half the screen move and half stay. It looks broken until you re-read the datasheet, so I'd check them first.

Method 2, Software ticker

You redraw the string at a moving X each frame. You get more control, but it's still just text.

int x = 128;
const char* msg = "Temp 28.4 C  Humidity 61%  ";

void loop() {
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextWrap(false);
  display.setCursor(x, 28);
  display.print(msg);
  display.display();
  x -= 2;
  if (x < -((int)strlen(msg) * 6)) x = 128;
  delay(20);
}

Pros: you control the pixel speed, long messages work, and it's easy to update the string from sensors. Cons: you spend CPU clearing and reprinting, and you still get a marquee. I find it good for a WiFi SSID, song titles or error strings, and it's what I'd reach for first.

Measure text width carefully if you use setTextSize(2), because character width doubles. I've shipped tickers that "jump" because the reset threshold used size-1 math on size-2 text. Don't make my mistake.

Assemble Studio Glitch Snap style animating a name on the OLED preview

Method 3, Frame-based name / logo animation

Frame animation costs flash, roughly 1 KB per full 128×64 frame. You'll pay that when you want the text to build instead of slide.

Examples I actually ship:

  • A desk name plate that rains letters into place once on power-up
  • A gadget boot screen where your logo fills in pixel by pixel
  • A classroom demo of PROGMEM + drawBitmap, so you don't have to teach hex editors first

That's the job of Assemble Studio. You type the string, pick a style and export the frame list. It's the same Adafruit / U8g2 stack, just different content in flash. Here's my name walkthrough: Arduino OLED name animation.

Complete hardware-scroll demo you can flash today

This sketch shows a banner, scrolls it, stops, then prints a second line. Use it to confirm that your panel supports the scroll commands before you try anything fancier.

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 20);
  display.print(F("HELLO"));
  display.display();

  display.startscrollleft(0x00, 0x0F);
  delay(3500);
  display.stopscroll();

  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0, 28);
  display.print(F("scroll done"));
  display.display();
}

void loop() {}

If HELLO never moves, you may have a clone controller, the wrong library, or a panel that only partially implements scroll. Fall back to the software ticker below. It works on every SSD1306 I own.

Complete software ticker with millis timing

Blocking delay() is fine for demos, and I use it too. In a real project you'll want your buttons and sensors to keep working, so here's a non-blocking marquee:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

const char* msg = "  Temp 28.4C   Hum 61%   OK  ";
int16_t x = 128;
uint32_t lastMs = 0;

void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.setTextWrap(false);
  display.setTextColor(SSD1306_WHITE);
  display.setTextSize(1);
}

void loop() {
  if (millis() - lastMs < 30) return;
  lastMs = millis();

  display.clearDisplay();
  display.setCursor(x, 28);
  display.print(msg);
  display.display();

  x -= 2;
  // size 1 ≈ 6 px per char
  int16_t w = (int16_t)strlen(msg) * 6;
  if (x < -w) x = 128;

  // your button / sensor reads can go here safely
}

When I still choose scroll on purpose

  • A WiFi portal showing SSID + IP on one line
  • Error strings that are longer than 21 characters at text size 1
  • Classroom demos where your flash is already full of sensor code

When I don't: product boot screens, gift badges, anything meant to feel "designed." Those get Assemble Studio frames instead. You'll see why once you try it, and I doubt you'll go back.

Side-by-side comparison

Hardware scrollSoftware tickerAssemble Studio
Flash costVery lowVery lowHigh (many frames)
CPU costVery lowMediumMedium (playback)
LookWhole screen slidesMarquee textPixels build shape
Best forDemos, bannersLive statusBoot / gift intro
Uno friendlyYesYesShort only

Quick decision rule

  • Long changing text → software ticker
  • Tiny sketch, any text already on screen → hardware startscroll*
  • One splash that should feel designed → name / logo assemble animation
  • Uno + long particle style → shorten frames or use ESP32

Mixing both is fine, and I do it often. You can scroll a status line under a static icon. Or play a 2-second assemble intro, then drop into your normal UI.

Common scroll bugs I still see in forums

  • You forget stopscroll() before drawing a new UI, and the leftover motion looks cursed
  • You call scroll before display(), so there's nothing visible to scroll
  • SH1106 modules that ignore hardware scroll quirks, so test on your real panel
  • Blocking delay() in ticker loops, so your buttons never respond. Use millis() timing

See assemble styles next to a live OLED mockup

Type your name, click Outside Random or Pixel Rain, and export the code if you like it.

Open Assemble Studio →

Frequently asked questions

Is startscrollleft bad?

No. It's perfect for short demos and status tickers. It just can't do particle-style intros, and you'll hit that wall quickly.

Does name animation need more flash than scrolling text?

Yes. Scrolling prints a string, while Assemble stores many bitmaps. Plan your flash budget, especially on Uno.

Can U8g2 do hardware scroll the same way?

The APIs differ, since U8g2 has its own helpers. The concept is similar, though. You either move buffer content or redraw text each frame.

Library comparison for animations?

See U8g2 vs Adafruit.

Why do examples pass 0x0F if a 128×64 panel only has pages 0-7?

Adafruit's demo often copies startscrollleft(0x00, 0x0F). On a 64-pixel SSD1306 the real pages are 0 through 7 (8 pixels each). I prefer startscrollleft(0, 7) for a full-height scroll, and a tighter range such as (4, 7) when you need a title in the top pages to stay still. A 128×32 panel only has pages 0-3.

My size-2 ticker jumps instead of looping. What width should I use?

Don't assume 6 pixels per character once setTextSize(2) is on. Size 2 is 12 pixels wide. Call getTextBounds() and reset x when it passes -w. The jump you see is that threshold, not a broken OLED.

Hardware scroll works on my SSD1306 and does nothing on another module. Same sketch.

Some SH1106 boards ignore or botch the SSD1306 scroll commands, and they're 132×64 internally, so a normal frame can already look shifted. If stopscroll and a software ticker still fail for you, treat it as the wrong controller. The software marquee doesn't need the scroll command at all.

Can I scroll a status line and still draw a bitmap?

Call stopscroll() first. Drawing while the controller is scrolling smears the next display(), so don't run a name-assemble intro underneath startscrollleft. Play the frames, stop, then start a ticker only if your UI still needs one.

Scroll the status line, leave the title put

A full-screen hardware scroll is why you get bored of startscrollleft. The useful version keeps rows 0-15 still and slides only the lower half. On a 128×64 SSD1306 each page is 8 pixels, so pages 0 and 1 are the title and pages 4-7 are a safe band for a long SSID. I print both strings, push the buffer once, then start the scroll. After that the controller moves its own RAM, and your Uno is free.

display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.print(F("Lab node"));          // pages 0-1, not scrolled
display.setCursor(0, 40);
display.print(F("SSID Lab-Guest  192.168.1.40"));
display.display();
display.startscrollleft(4, 7);         // pages 4-7 only

// later, before any new UI:
// display.stopscroll();
// display.clearDisplay();

The wiring for this demo is the same 4-pin I2C hookup you've seen elsewhere on this site: Uno/Nano SDA A4, SCL A5, address 0x3C or 0x3D, reset -1. Mega moves SDA/SCL to pins 20 and 21. ESP32 uses GPIO21 and GPIO22 with the module on 3.3 V. ESP8266 NodeMCU uses D2 and D1. None of that changes the page numbers. A 128×32 display does change them. Only pages 0-3 exist, so startscrollleft(4, 7) scrolls nothing and looks like a dead command.

If the title slides too, you've got the wrong start page. Page 0 begins at y=0 and page 4 at y=32. If you draw text at y=20, it's already in page 2. Put the frozen line at y=0 and the moving line at y=40 or lower, then pass that split into startscrollleft. Call stopscroll() before the next clearDisplay(), or the following frame shears.

I still don't use this effect for a gift name. Hardware scroll can't rain pixels into a word, and that's not what it's for. That's frame animation, at about 1024 bytes per full frame. The scroll above costs a string in flash, and it's the right tool when the text changes every time someone joins your network.

Marquee bugs with a specific cause

  • Half the letters move, half smear into the title. Your start or stop page overlaps the title. On 128×64 use pages 0-7 only. (4, 7) leaves y=0 alone if you actually drew the title in pages 0-1. (0, 0x0F) from a copied demo scrolls every page the chip will accept, which is the whole glass.
  • Software ticker resets too early at text size 2. Your wrap math still uses 6×strlen, and that's the bug. Size 2 is 12 pixels per glyph. Measure with getTextBounds(msg, 0, 0, &x1, &y1, &w, &h) and set x = 128 when x < -((int16_t)w).
  • Scroll never starts, Serial is silent, glass is black. That isn't a scroll bug. Either begin failed, or the address jumper is 0x3D while your sketch says 0x3C, or RES is held low because you gave the constructor a real GPIO on a 4-pin board. Prove Hello World before you time a marquee. It's the cheapest test you've got.
  • Ticker is smooth, then a sensor read makes it stutter. You've got a blocking DHT or Wi-Fi call inside the 30 ms slot. Keep the marquee on millis(), and let a slow sensor update a char buffer on a one-second timer. Hardware scroll avoids this because the chip moves pixels while you block. That's also why you must stopscroll() before you draw the result.
  • SH1106 module: SSD1306 scroll does nothing or looks offset. Fall back to the software ticker. Those panels are 132 columns internally, so an SSD1306 constructor already shifts the still image by about two pixels, and the hardware scroll command is a second disappointment. Fix the driver first, because it's the cause.
  • Contrast drops the moment scroll starts. You've probably copied unrelated commands into loop(). Set contrast once after begin (SSD1306_SETCONTRAST then 0xCF). Scrolling doesn't dim the panel, but a value of 0 does.

Same marquee, different boards

BoardI2CWhat I watch
Uno / NanoA4 / A5, 5VHardware scroll and a software ticker both fit. Frame-based names run out of flash first
Mega 256020 / 21, 5VMore flash for a name animation if you outgrow scroll. Move the I2C wires or the glass stays black
ESP8266 NodeMCUD2 / D1, 3.3VWire.begin(D2, D1) before begin. Software ticker has room to spare
ESP32GPIO21 / GPIO22, 3.3VUse this when you want both a long ticker and a multi-frame intro. SPI only if a later bitmap loop needs the speed

I2C at 400 kHz is enough to redraw a one-line ticker. You aren't pushing a fresh 1024-byte bitmap every frame unless you clear and reprint the whole buffer yourself, which the software ticker does and hardware scroll doesn't. That's the speed difference that matters here. SPI's extra wires help a full-frame animation loop, but they won't make startscrollleft look better.

Breadboard noise shows up as a ticker that freezes for a second and then jumps. Reseat SDA and SCL before you tune FRAME_MS. A duplicate device at 0x3C (a second OLED, or an address jumper you didn't touch) makes begin fail or the scroll stutter. One display per address, no exceptions.

Related guides you might like

Free tools: OLED Animation Maker for your SSD1306 and SH1106 animations, Assemble Studio for your name and logo animations, the Shadow Box Lamp Generator for your 3D-printed shadow lamps, Text to STL for your 3D-printed names and keychains, and 3MF to Web to show your 3D prints on any website. New: the Image to Byte Array converter, the OLED Robot Eyes generator and the Lithophane Maker. See all tools.