Source: https://mokxi.com/learn/path/oled-graphics
Updated: 2026-11-20

All paths

# OLED graphics and fonts

Pixel screens on an Uno with 2 KB of RAM: the SSD1306’s 1 KB framebuffer byte by byte, lines and circles, fonts, sprites, U8g2’s page mode, an SH1106 beside it through a TCA9548A, and a two-screen pocket space game.

Arduino Uno R3 Free 7 lessons 6 h 4 chapters 2,508 XP Embedded engineering · Intermediate +150 XP

0 of 7 done

Start the course free The SSD1306 framebuffer Lesson plan for teachers

What you will build

## 3 projects, built step by step

7 lessons in 4 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

### Pixels and lines

Adafruit_GFX lines, rectangles and circles, each one’s pixels counted, then a radar whose sweep follows a knob, and the trick that sends 29 ms of changes instead of a 348 ms frame.
Open it in the simulator

Chapter 2 project

### Bitmaps and sprites

A 16x16 rocket packed into 32 bytes of flash, flown across a starfield: the knob climbs, the button fires a laser, and each frame rubs out only where the ship was.
Open it in the simulator

Chapter 3 project

### SH1106 and two screens

An SSD1306 and an SH1106, both at 0x3C, behind a TCA9548A. The Uno has room for one 1 KB frame, so the SH1106 is drawn a page at a time through a 128-byte strip, from column 2.
Open it in the simulator

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Pixels in memory

The framebuffer, and the shapes drawn into it.

Open 249 XP

### The SSD1306 framebuffer

A 128x64 OLED is 1024 bytes in eight pages. Write bytes straight into the frame, count the pixels they light, and see what that kilobyte costs an Uno with 2048 bytes of RAM.

0 of 7 steps

Start What is in it

Project Locked 534 XP

### Pixels and lines

Adafruit_GFX lines, rectangles and circles, each one’s pixels counted, then a radar whose sweep follows a knob, and the trick that sends 29 ms of changes instead of a 348 ms frame.

0 of 7 steps

5 questions, graded as you go.

Chapter 2

## Text and pictures

Fonts, bitmaps and a sprite that flies.

Locked 231 XP

### Fonts

The built-in 6x8 cell at sizes 1 to 3, getTextBounds() to center a score that follows a knob, and a GFXfont whose cursor sits on the baseline, the classic OLED gotcha.

0 of 7 steps

Project Locked 498 XP

### Bitmaps and sprites

A 16x16 rocket packed into 32 bytes of flash, flown across a starfield: the knob climbs, the button fires a laser, and each frame rubs out only where the ship was.

0 of 7 steps

4 questions, graded as you go.

Chapter 3

## Less RAM, more screens

Page mode, and two screens that share one address.

Locked 218 XP

### U8g2 pages

U8g2’s picture loop draws Saturn one page at a time: a 128-byte buffer, eight passes a frame, and the strict rule that every pass draws the same picture. Plus an honest note on what Mokxi models.

0 of 6 steps

Project Locked 498 XP

### SH1106 and two screens

An SSD1306 and an SH1106, both at 0x3C, behind a TCA9548A. The Uno has room for one 1 KB frame, so the SH1106 is drawn a page at a time through a 128-byte strip, from column 2.

0 of 7 steps

4 questions, graded as you go.

Chapter 4

## Boss project

A pocket space game with a dashboard on a second screen.

Locked 280 XP

### Boss: a pocket dashboard

A pocket space game on two screens: a rocket dodging asteroids on the SSD1306, a fuel gauge, score and high score on the SH1106. One 1 KB frame, one 128-byte strip, a laser and shields.

0 of 8 steps

3 questions, graded as you go.

Syllabus

## Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Pixels in memory

- The SSD1306 framebuffer A 128x64 OLED is 1024 bytes in eight pages. Write bytes straight into the frame, count the pixels they light, and see what that kilobyte costs an Uno with 2048 bytes of RAM.
- Pixels and lines Adafruit_GFX lines, rectangles and circles, each one’s pixels counted, then a radar whose sweep follows a knob, and the trick that sends 29 ms of changes instead of a 348 ms frame.

Chapter 2

### Text and pictures

- Fonts The built-in 6x8 cell at sizes 1 to 3, getTextBounds() to center a score that follows a knob, and a GFXfont whose cursor sits on the baseline, the classic OLED gotcha.
- Bitmaps and sprites A 16x16 rocket packed into 32 bytes of flash, flown across a starfield: the knob climbs, the button fires a laser, and each frame rubs out only where the ship was.

Chapter 3

### Less RAM, more screens

- U8g2 pages U8g2’s picture loop draws Saturn one page at a time: a 128-byte buffer, eight passes a frame, and the strict rule that every pass draws the same picture. Plus an honest note on what Mokxi models.
- SH1106 and two screens An SSD1306 and an SH1106, both at 0x3C, behind a TCA9548A. The Uno has room for one 1 KB frame, so the SH1106 is drawn a page at a time through a 128-byte strip, from column 2.

Chapter 4

### Boss project

- Boss: a pocket dashboard A pocket space game on two screens: a rocket dodging asteroids on the SSD1306, a fuel gauge, score and high score on the SH1106. One 1 KB frame, one 128-byte strip, a laser and shields.

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About OLED graphics and fonts

Is OLED graphics and fonts free?

Yes. All 7 lessons of OLED graphics and fonts are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does OLED graphics and fonts take?

About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Pixels and lines, Bitmaps and sprites and SH1106 and two screens.

Where do I start?

With "The SSD1306 framebuffer", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
