Raspberry Pi – OLED Displays!

In this tutorial I show you how to use a mini OLED Display with your Raspberry Pi! By the end of this tutorial you will be able to make it show everything from text to full images, as well as be able to wire up something to the SPI pins on the Pi! Small displays are great fun to play around with… The project possibilities are truly endless! Previously the only small displays you could get for your Pi have been LCD character displays – these soon get boring because all you can do is display text. But recently I saw these 1″ monochrome OLED displays from Adafruit. These promised high contrast text and the ability to display proper graphics and images. Do they disappoint?

Not one bit! They truly are excellent pieces of hardware that are so flexible. You could make it display important system information… Or you could program a game of tetris on one! Watch my tutorial to see for yourself!


I have written this entire tutorial up for Adafruit’s learning system. You can see that here: http://learn.adafruit.com/adafruit-oled-displays-for-raspberry-pi

You can buy the display and all of the other components in this video from Pimoroni if you are in the UK: http://pimoroni.com/

And Adafruit if you are in the US: http://www.adafruit.com/

Show me your projects at: theraspberrypiguy@gmail.com

Thanks for watching and I hope that you have enjoyed this tutorial! It took me a long time to make so if you wouldn’t mind could you please drop me a subscription? A like maybe? I might be pushing it here… But maybe even share it? Thanks!

The Raspberry Pi Guy

Aren’t those penguins just adorable?

NOTE: I have made a tiny tiny tiny error with the circuit diagram. That red wire is meant to go to pin 1 on the Pi… Not pin 3. I must have got distracted by a passing butterfly and accidentally jogged the mouse. Sorry about that folks!

11 comments on “Raspberry Pi – OLED Displays!
  1. Hi there. You make quite interesting projects and i’m gonna say I’m inspired- wait.. more than inspired. So I hope if you won’t mind if i link your website to my blog(www.teczombie.com). I’m too interested in making cool stuff from the raspberry Pi. Just to tell you, I got my pi camera board yesterday. Will tinker around with it a bit more tomorrow.

  2. Mikael says:


    Thanks for a very nice tutorial.
    How hard would it be to change the code to work on an I2C version of the display?

    Kind regards,


    • Glad that you enjoyed the tutorial! Sadly I do not have any experience with the I2C version of the display – they are different protocols and I imagine they would be very different in terms of software.

  3. Klayt says:

    Does this support playing video from a camera like the flir lepton thermal camera? Thanks!

  4. Mike Cook says:

    Your code only seems to display 32 pixels in the Y direction. Any idea why that is?

  5. Mike Cook says:

    There is nothing in you code that seems to set this and the SSD1306 (which is called up by your code) is a 128 by 64 display and yet every other Y pixel is blank.

  6. Mike Cook says:

    The first shot in your video seems to be correct and show the full 64 pixel resolution but after that all the pictures and text you show has only 32 pixel resolution. You say in the video you are using a 128 by 64 display as does the caption on the video.

  7. Mike Cook says:

    OK cracked it – in all your software you have the line:-
    led = gaugette.ssd1306.SSD1306(reset_pin=RESET_PIN, dc_pin=DC_PIN)
    Where as the default display resolution is 32 so all your software is running in 32 pixels mode. You want to instantiate the class with:-
    led = gaugette.ssd1306.SSD1306(reset_pin=RESET_PIN, dc_pin=DC_PIN, rows=64)

Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.