The Yocto Project on Raspberry Pi 5 Episode 9: Enable I2C and Use SSD1306 Mini OLED Display on Linux @LeonAnavi
The Yocto Project on Raspberry Pi 5 Episode 9: Enable I2C and Use SSD1306 Mini OLED Display on Linux  @LeonAnavi
Uploaded September 2025 | Updated September 2026, 2 weeks ago
Step by step tutorial how to enable I2C on Raspberry Pi and use it on an image of a custom Linux distribution built with the Yocto Project and OpenEmbedded. Enable I2C and autoload I2C Linux kernel modules by adding the following two lines in conf/local.conf:

ENABLE_I2C = "1"
KERNEL_MODULE_AUTOLOAD:rpi += "i2c-dev i2c-bcm2708"

Include packages to scan for I2C devices and interact with mini OLED SSD1306 I2C display:

IMAGE_INSTALL:append = " i2c-tools ssd1306"

To use the ssd1306 open source app and show test on the display execute:

ssd1306_bin -n 1 -I 128x64
ssd1306_bin -n 1 -c
ssd1306_bin -n 1 -r 0
ssd1306_bin -n 1 -x 1 -y 1
ssd1306_bin -n 1 -l "Hello World"
ssd1306_bin -n 1 -x 1 -y 2
ssd1306_bin -n 1 -l "The Yocto Project"
ssd1306_bin -n 1 -x 1 -y 3
ssd1306_bin -n 1 -l "on Raspberry Pi 5"

⚙️ Hardware
===
ANAVI Info uHAT
crowdsupply.com/anavi-technology/anavi-info-uhat
eu.mouser.com/c/?q=anavi%20info%20uhat

Yellow-blue Mini OLED I2C Display SSD1306
https://mou.sr/4m9jNu3

🔗 Related Videos
===
Episode 1: Building an Embedded GNU Linux Distribution
youtu.be/fY7u6PiV8qA?si=goTZ5V7I2dwa33a-
Episode 2: SSH for Remote Network Access
youtu.be/ltckiBV9FXg?si=DJwsKLDhHkDIqCIn
Episode 3: The Yocto Project on Raspberry Pi 5 Episode 3: Running Docker Containers
youtu.be/kQnOidK_U3M?si=5KiS1FK87OwfdQ0m
Episode 4: The Yocto Project on Raspberry Pi 5 Episode 4: U-Boot Bootloader
youtu.be/9tohomiv1Ug?si=kylUv0uT_BFmXt5g
Episode 5: Modifying U-Boot Environment in Linux with fw_setenv
youtu.be/SB5NvIF1IEU?si=0So6Gfv9hQR7gQgY
Episode 6: Runtime Package Management with apt and deb Packages
youtu.be/6i5UtF7fiaA?si=8DuUHUxywVEEtdyN
Episode 7: Create a New Layer, a New Recipe (.bb) and .bbappend
youtu.be/W5J1W_Cy14Y?si=ftu5WpeGqel8BZhf
Episode 8: Using ConnMan Network Manager for Wi-Fi Connectivity
youtu.be/ib8a0PeOGAU?si=jOPOYReA1woIZOJF

📚 Useful Links
===
yoctoproject.org
docs.yoctoproject.org
openembedded.org/wiki/Main_Page
github.com/armlabs/ssd1306_linux
meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#enable-i2c

📑 Chapters
===
0:00 Intro
0:22 Enable I2C
2:22 How Does It Work
4:01 Hardware Setup
5:10 I2C Scan
7:09 SSD1306
10:14 Summary
11:17 Conclusions
The Yocto Project on Raspberry Pi 5 Episode 9: Enable I2C and Use SSD1306 Mini OLED Display on LinuxLenovo ThinkPad Thunderbolt 3 Dock 40AC DBB9003L1 with ThinkPad T14 and Ubuntu 24.04 TLS LinuxThe Yocto Project on Raspberry Pi 5 Episode 5: Modifying U-Boot Environment in Linux with fw_setenvXIAO ESP32-C5 GPIO pins on IoT Board with Dual-Band WiFi, BLE, Zigbee, Thread, RISC-V MCU #esp32c5Intel AX201 Wi-Fi 6.0 and Bluetooth 5.1 on Lenovo ThinkPad T14 Gen 1 Laptop #shorts #thinkpadHow to connect the Raspberry Pi Touch Display 2 to the Raspberry Pi 5? #raspberrypi #shorts #linuxESP32-H2 SuperMini Development Board with 32-bit RISC-V MCU, Wi-Fi, BLE, Thr ead and Zigbee #esp32Level Up Your 3D Printing: Install Brass Thread Inserts Like a Boss with Mintion Nutopress ProUnboxing Raspberry Pi Compute Module 5 IO Case SC1753 #raspberrypi #linuxUnboxing XIAO RA4M1 with Renesas Arm MCU, 19 GPIOs, RGB LED, CAN BUS and USB 2.0 #shorts #arduinoideUnboxing Meshtastic Dev Kit with XIAO nRF52840 and Wio-SX1262 LoRa #shorts #meshtasticMulti-Functional Cabinet Door Installation Tool for Precise Dowel Drilling. Ideal for DIY Carpenters
Leon Anavi |

The Yocto Project on Raspberry Pi 5 Episode 9: Enable I2C and Use SSD1306 Mini OLED Display on Linux

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER