Python Wiring

It's easy to use OLEDs with Python and the Adafruit CircuitPython SSD1306 module.  This module allows you to easily write Python code to control the display.

We'll cover how to wire the OLED to your Raspberry Pi. First assemble your OLED.

Since there's dozens of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms, please visit the guide for CircuitPython on Linux to see whether your platform is supported

Connect the OLED as shown below to your Raspberry Pi.

Adafruit PIOLED

  • The PiOLED comes fully assembled. Simply plug into any Raspberry Pi as shown.

Adafruit 128x64 OLED Bonnet for Raspberry Pi

  • The OLED Bonnet comes fully assembled. Simply plug into the Raspberry Pi as shown.

Adafruit 128x32 I2C OLED Display

  • Pi 3.3V to OLED VIN
  • Pi GND to OLED GND
  • Pi SCL to OLED SCL
  • Pi SDA to OLED SDA
  • Pi GPIO4 to OLED RST (or any available GPIO pin)

Adafruit 0.96" or 1.3" 128x64 OLED Display - I2C Wiring

You must solder two jumpers closed on the back of the display to use with I2C!

 

  • Pi 3.3V to OLED Vin
  • Pi GND to OLED Gnd
  • Pi SCL to OLED Clk
  • Pi SDA to OLED Data
  • Pi GPIO4 to OLED Rst (or any available GPIO pin)

Adafruit 128x32 SPI OLED Display

  • Pi 3.3V to OLED VIN
  • Pi GND to OLED GND
  • Pi MOSI to OLED DATA
  • Pi SCLK to OLED CLK
  • Pi GPIO4 to OLED RST (or any available GPIO pin)
  • Pi GPIO5 to OLED CS (or any available GPIO pin)
  • Pi GPIO6 to OLED DC (or any available GPIO pin)

Adafruit 0.96" or 1.3" 128x64 OLED Display - SPI Wiring

  • Pi 3.3V to OLED VIN
  • Pi GND to OLED GND
  • Pi MOSI to OLED DATA
  • Pi SCLK to OLED CLK
  • Pi GPIO4 to OLED RST (or any available GPIO pin)
  • Pi GPIO5 to OLED CS (or any available GPIO pin)
  • Pi GPIO6 to OLED DC (or any available GPIO pin)
This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012. This page (Python Wiring) was last updated on Jan 26, 2020.