Raspberry Pi Pico ProjectsRaspberry Pi Projects

How To Use SSD1306 Oled Display With Raspberry Pi Pico


In this tutorial we will learn how to Interface a 0.96″ OLED Display with Raspberry Pi Pico Board, The OLED display is one of the most popular and Attractive Displays available for a microcontroller.

The organic light-emitting diode (OLED) display that we’ll use in this tutorial is the SSD1306 model Display With Raspberry Pi Pico 0.96-inch display with 128×64 pixels.

Why NextPCB

  • Most Efficient, Economic, Inventive PCB Solutions
  • Higher Quality
  • Lower Price
  • Faster Delivery

[the_ad id=”5035″]

Required Components – OLED Display with Raspberry Pi Pico

OLED Display

OLED Display 0.96 i2C 128x64


An organic light-emitting diode (OLED )is a light-emitting diode (LED) in which the emissive electroluminescent layer is a film of organic compound that emits light in response to an electric current.

This is easy to use OLED display, 0.96” screen size, 128×64 resolution, and SSD1306 driver. You can connect to it via I2C

SSD1306 Module0.96 OLED display

The SSD1306 does communicate with the microcontroller to get the data and send it to the OLED screen to draw that data, Communication between the SSD1306 and the microcontroller, be it a Raspberry Pi Pico or an Arduino, is done via SPI or I2C.

  • Generally, SPI communication is faster than I2C communication.
  • In contrast, SPI communication requires more pins than I2C communication.

OLED screens have the advantage of having a very low consumption, around 20mA since only the necessary pixel is lit and they do not require a backlight. This is especially interesting in battery-powered applications.

OLED Display Pinout 

Here is Pinout of OLED Display Pinout 

  • GND: ground pin.
  • VCC: is the power pin. The screen can be powered between 1.8V and 6V.
  • SCL: is the clock signal pin of the I2C interface.
  • SDA: It is the data signal pin of the I2C interface.


  • Driver: SSD1306
  • Screen size: 0.96”
  • Screen dimensions: 22 x 11 mm
  • Resolution: 128 x 64 pixels
  • Supply voltage: 3 – 5 V
  • Module size: 27 x 27 x 3.5 mm

Wiring Diagram for OLED Display with Raspberry Pi Pico

OLED Display with Raspberry Pi Pico

wiring is very simple. You just need to connect to the Raspberry Pi pico I2C pins as shown in the Below

OLED Pin Wiring to Raspberry Pi pico
Vin 3.3V

Source Code and Libraries for OLED Display with Raspberry Pi Pico

To control the OLED display with Micropython code you need the OLED libraries. Follow the next instructions to install those libraries.

The programming here is divided into two main parts:

1. SSD1306.py // this is SSD1306 Driver Code
2. Main.py   
  //  this is the main code


Firstly you need to create a new file in Thonny IDE. Copy the following code & save the file by the name ssd1306.py on Raspberry Pi Pico Board.

Open a new tab again in the Thonny IDE. Copy the following below code and paste it onto the Thonny IDE new tab. Save the file by the name main.py in Raspberry Pi Pico.


After the Upload code, You will see that the OLED Start Texting is on Display.

[the_ad id=”5038″]

Read Similar Articles:

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker