These instructions are for the Adafruit 128x64 OLED graphic display. You can follow the official Adafruit tutorial here.

Install Arduino libraries

Step 1: Open Manage Libraries in Arduino IDE file menu

Screenshot of selecting Tools->Manage Libraries... from Arduino IDE file menu

Step 2: Search for and install Adafruit SSD1306

Search for and install the Adafruit SSD1306 library.

Screenshot searching for Adafruit SSD1306 library in Arduino IDE Library Manager

Step 3: Install all dependencies

When asked, install all SSD1306 library dependencies:

Load and run sample code

Once the SSD1306 library and dependencies have been installed, wire up and test out the display using the ssd1306_128x64 example code.

Screenshot of using Arduino IDE file menu to load the SSD1306 sample code

Resources:

  • https://learn.adafruit.com/monochrome-oled-breakouts/overview
  • https://lastminuteengineers.com/oled-display-arduino-tutorial/
  • https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives

SPI vs. I2C

  • SPI is much faster: https://www.youtube.com/watch?v=SvOX-xs9v8M

This website was developed by Professor Jon E. Froehlich and the Makeability Lab using Just the Docs. If you found the website useful or use it in your teaching, we'd love to hear from you: jonf@cs.uw.edu. This website and all code is open source (website GitHub, Arduino GitHub, p5js GitHub). You can find the MakeabilityLab_Arduino_Library here. Found an error? File a GitHub Issue.