Installing Adafruit OLED libraries

Table of Contents

  1. Step 1: Open the Library Manager
  2. Step 2: Search for Adafruit SSD1306
  3. Step 3: Install Adafruit SSD1306 library
  4. Step 4: Install all dependencies
  5. Step 5: Confirm installation
  6. Library installation folder location
  7. Return to OLED lesson

To use the Adafruit OLED display, we need two libraries:

  • The Adafruit_SSD1306 display driver library, which handles display communication, memory mapping, and low-level drawing routines.
  • The Adafruit_GFX graphics library, which provides core graphics routines for all Adafruit displays like drawing points, lines, and circles.

To install both, follow the instructions below:

Step 1: Open the Library Manager

Open your Arduino IDE, then open the Library Manager. In Arduino IDE 2.x, click the library icon in the left sidebar (it looks like stacked books) or go to Sketch → Include Library → Manage Libraries.

Screenshot of the Arduino IDE showing how to open the Library Manager

Step 2: Search for Adafruit SSD1306

In the Library Manager, search for “Adafruit SSD1306”. There are other SSD1306 libraries, so make sure you find the one by Adafruit. The screenshots below may show an older version—always install the latest available version.

Screenshot of the Library Manager search results showing the Adafruit SSD1306 library

Step 3: Install Adafruit SSD1306 library

Click on the Install button.

Screenshot showing the Install button highlighted for the Adafruit SSD1306 library

Step 4: Install all dependencies

The Adafruit SSD1306 library depends on other libraries (including Adafruit GFX and Adafruit BusIO), which we also need. Fortunately, the Library Manager detects this and explicitly asks about dependencies. Select Install all.

Screenshot of the dependency installation dialog asking whether to install all required dependencies

Step 5: Confirm installation

If the SSD1306 library was correctly installed, you should see a teal “INSTALLED” label next to it as we do below:

Screenshot showing the Adafruit SSD1306 library with a teal INSTALLED label confirming successful installation

Library installation folder location

All libraries are installed in a libraries folder within your Arduino sketchbook directory. It’s useful to know this location in case you want to do a manual install of a library (like the Makeability Lab Arduino Library) or want to view library source code.

Depending on your OS, the default location is:

  • Windows: C:\Users\<username>\Documents\Arduino\libraries
  • Mac: /Users/<username>/Documents/Arduino/libraries
  • Linux: ~/Arduino/libraries
Arduino Library directory on Windows Arduino Library directory on Mac
Screenshot of the Arduino libraries folder on Windows in File Explorer Screenshot of the Arduino libraries folder on Mac in Finder

You’ll note that the libraries folder contains raw source code and not pre-compiled binaries. The Arduino IDE compiles the underlying library files differently depending on the selected board.

Return to OLED lesson

You’re all set! Return to the OLED lesson to wire up your display and start drawing.


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.

Made with ♡ by the The Makeability Lab logo which is a large geometric M with an embedded L