ThingPulse OLED SSD1306: six display classes over Wire, BRZO and SPI for ESP8266 and ESP32
Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
At a glance
- What is it?
- This Arduino library drives SSD1306 and SH1106 OLEDs from ESP8266, ESP32 and mbed-os. The bus is chosen by class name, and a built-in UI carousel handles frames.
- Who is it for?
- Use it if you have an ESP8266 or ESP32 with a monochrome SSD1306 or SH1106 panel and want text, fonts and a frame carousel without writing a driver. Sketches from before 3.0 need porting.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 26 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- ThingPulse/esp8266-oled-ssd13062,185 ★ · +6
| Repository | 2026-10-08 | 2026-11-25 |
|---|---|---|
| ThingPulse/esp8266-oled-ssd1306 | 2.2k | 2.2k |
6 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
One constructor per bus: SSD1306Wire, SSD1306Brzo and SSD1306Spi, each with an SH1106 twin
The library chooses the bus by class name. The README documents three transports: I2C through the built-in Wire.h, I2C through the BRZO I2C library, which it calls much faster and written in assembler, and SPI. Each has one class for the SSD1306 and one for the SH1106, so there are six: SSD1306Wire and SH1106Wire, SSD1306Brzo and SH1106Brzo, SSD1306Spi and SH1106Spi.
The constructors differ in what they ask for. The I2C ones take an address, SDA and SCL, as in `SH1106Wire display(0x3c, SDA, SCL); // ADDRESS, SDA, SCL`. The SPI ones take reset, data-command and chip-select pins:
#include <SPI.h>
#include "SSD1306Spi.h"
SSD1306Spi display(D0, D2, D8); // RES, DC, CSIf the CS pin is hard wired to ground, pass CS as -1. Mixing up the I2C and SPI headers is the first mistake a new user makes, because the display module itself looks the same.
Wire.h defaults to 700000 Hz, and the SH1106 constructor lets you set 400 kHz or skip the setting
By default SSD1306Wire and SH1106Wire set the I2C frequency to 700000. The README's comments in the SH1106 example show the two ways around that: pass a frequency as the sixth argument, as in `SH1106Wire(0x3c, SDA, SCL, GEOMETRY_128_64, I2C_ONE, 400000);` for 400 kHz, or pass -1 to skip setting the I2C bus frequency at all.
That last option matters when something else shares the bus. A sensor that wants 100 kHz or 400 kHz will be disturbed if the display driver quietly reconfigures the clock, and -1 leaves the bus as whoever initialized it set it. The README states the default and the two overrides and says nothing about which displays tolerate 700 kHz, so a flickering or blank screen is the symptom to check against the frequency first.
The second I2C peripheral is selectable with `I2C_TWO`, for boards that have one. The default is `I2C_ONE`. The README shows the geometry argument for 128x64, and `GEOMETRY_128_32` for the shorter panel.
The README lists four panel sizes, and a separate file covers 64x48
The opening paragraph gives the supported panels as 128x64, 128x32, 64x48 and 64x32, for either the I2C or SPI version of the display. The repository description lists three of those, so the README is the more complete statement.
The 64x48 case has its own document at the repository root, README_GEOMETRY_64_48.md. Its contents are not part of the README, so this article cannot say what it warns about. Its existence is a signal that the small geometry needs setup beyond choosing a constant, and a buyer of a 64x48 module should read it before wiring.
SSD1306 and SH1106 are different controllers behind similar-looking panels, which is why the library carries parallel classes for each. Picking the wrong family is a common reason for a shifted or noisy image, and the README does not explain how to tell which one a given module uses. It names the display in the ThingPulse IoT starter kit, also called the classic kit or weather station kit, as the one this library drives.
Text drawing carries alignment, a font array format of its own and a pixel-width wrap limit
The feature list covers pixels, lines, rectangles drawn or filled, and text. Text can be aligned Left, Right or Center, set in a chosen font face, and limited to a width in pixels, after which the renderer wraps to a new line if it can.
Fonts are stored in what the README calls a proprietary but open format. New fonts come from a web app at oleddisplay.squix.ch: choose the family, style and size, check the preview, click Create, and the font array appears in a text area to paste into a new or existing header file. The library ships its own font headers, listed for mbed-os as OLEDDisplayFonts.h.
A hidden cost sits here. Each font is a C array held in program memory, and every extra size and style adds to the sketch. The README gives no byte counts. A project using several large fonts on a small ESP8266 should look at the compiled size after adding each header.
OLEDDisplayUi runs a side-scrolling carousel of frames with one indicator dot per frame
The UI helper is the library's most opinionated piece. It displays content in an automatically side-scrolling carousel. You define transition cycles, how long each frame stays on screen, and you draw each frame in a callback method. One indicator per frame is shown automatically, and the active frame is drawn differently from the inactive ones.
The example folder shows what that looks like in use: examples/SSD1306UiDemo, alongside SSD1306SimpleDemo, SSD1306DrawingDemo, SSD1306FontTryout, SSD1306ClockDemo, SSD1306ScrollVerticalDemo, SSD1306TwoScreenDemo and SSD1306OTADemo. The two-screen demo is the one to read if you want two displays on one board, and the README says nothing more about it.
The README also points to the ESP8266 Weather Station library as a larger consumer of this one, used to display weather information. A project that wants a rotating status display of clock, weather and sensor values is the intended fit. A project that needs touch, color or graphics beyond monochrome primitives is not.
Install by zip, library manager, PlatformIO or by copying six files for mbed-os
The README gives several install routes. Download the zip and unpack it into Arduino/libraries, or find it in the Arduino library manager as "ESP8266 and ESP32 Oled Driver for SSD1306 display". For PlatformIO it gives a single command:
platformio lib install 2978For mbed-os there is a copy available under the name OLED_SSD1306 by Helmut Tschemernjak, or you copy OLEDDisplay.cpp, OLEDDisplay.h, OLEDDisplayFonts.h, OLEDDisplayUi.cpp, OLEDDisplayUi.h and SSD1306I2C.h into your project. That is six files, and the list names SSD1306I2C.h, not the Wire class used on Arduino.
The repository also has library.json, library.properties, platformio.ini, CMakeLists.txt and component.mk, covering PlatformIO, Arduino, CMake and the ESP-IDF component layout. The BRZO transport requires the separate brzo_i2c library, which you install yourself.
Two upgrade guides, 3.0 and 4.0, mean old sketches break, and the last push was on 28 May 2026
The API changed a lot with release 3.0, and the README points to UPGRADE-3.0.md. Going from 3.x to 4.0 a lot of internals changed and compatibility for more displays was added, with UPGRADE-4.0.md. A sketch written against the 2.x or 3.x API will not compile against the current library without changes, so pin the version of anything older.
The repository is not archived. The latest release is 4.6.2 from 9 January 2026, after 4.6.1 on 25 May 2024 and 4.6.0 on 24 May 2024. The last push to master was on 28 May 2026. GitHub could not identify the license (NOASSERTION), and the repository has a file named license, so read it before shipping the library in a product.
The README labels this a ThingPulse prime project and points to an open-source commitment declaration for what that means. The credits give Daniel Eichhorn as original author, Fabrice Weinberg for optimizing and refactoring, and Helmut Tschemernjak for mbed-os support. The SSD1306 init sequence was inspired by Adafruit's library for the same display.
Editorial conclusion
Use it if you have an ESP8266 or ESP32 with a monochrome SSD1306 or SH1106 panel and want text, fonts and a frame carousel without writing a driver. Sketches from before 3.0 need porting. Before wiring, confirm whether your module is SSD1306 or SH1106 and I2C or SPI, and read the license file.
Frequently asked questions
What is the SSD1306 OLED display?
It is one of the two controller families this library drives, alongside the SH1106. The README supports 128x64, 128x32, 64x48 and 64x32 panels, in I2C or SPI versions.
How do I use the SSD1306 OLED module with Arduino?
Install the library from a zip or the Arduino library manager, include SSD1306Wire.h and create SSD1306Wire display(0x3c, SDA, SCL) for I2C. For SPI use SSD1306Spi with reset, data-command and chip-select pins.
Does the ThingPulse SSD1306 library support the SH1106?
Yes. Each transport has an SH1106 class: SH1106Wire, SH1106Brzo and SH1106Spi.
How do I install the ThingPulse OLED library with PlatformIO?
Run platformio lib install 2978, as the README gives it.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/thingpulse-esp8266-oled-ssd1306)Star history chart for your README
[](https://hysenlabs.com/projects/thingpulse-esp8266-oled-ssd1306)Was this useful?