Displaying Cyrillic fonts on a 128x64 OLED display

Recently I picked up a couple inexpensive 128x64 pixel OLED displays with an I2C interface. It turns out that displaying Russian text on these displays is not difficult. But it’s non-obvious. This is a brief description of how to make it work.

First, there’s a variety of these little displays and they’re all seemingly configured a little differently. I used this device for this test.

There are two options for libraries to simplify communicating with SSD1306 boards:

The u8g2 library has a much more robust mechanism for selecting fonts, so that’s what I used.

Here’s the code in full:

#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
	#include <SPI.h>
#ifdef U8X8_HAVE_HW_I2C
	#include <Wire.h>

    Illustrating the use of cyrillic text on the 128x64 OLED display
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, SCL, SDA, U8X8_PIN_NONE);

void setup(void) {
	u8g2.enableUTF8Print();        // enable UTF8 support for the Arduino print() function

void loop(void) {
	// select a font with 11px height
	do {
		u8g2.setCursor(0, 40);
		u8g2.print("Всем привет!");
		u8g2.print("Как у вас?");
	} while ( u8g2.nextPage() );