- Step 1: Open “Manage Libraries”
- Step 2: Search for Adafruit SSD1306
- Step 3: Install Adafruit SSD1306 library
- Step 4: Install all dependencies
- Step 5: Confirm installation
- Library installation folder location on OS
- 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, circles.
To install both, follow the instructions below:
Open your Arduino IDE, then go to
Tools -> Manage Libraries.
In the Library Manager, search for “Adafruit SSD1306”. There are other SSD1306 libraries so make sure you find the one by Adafruit. In this screenshot, the current version is 2.4.4.
Click on the
The Adafruit SSD1306 library depends on two other libraries, which we also need to install. Fortunately, the Library Manager detects this and explicitly asks about dependencies. So, select
If the SSD1306 library was correctly installed, you should see a teal “INSTALLED” label next to it as we do below:
All libraries are installed in the
Documents folder on your OS. It’s useful to be aware of this directory 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, you can view the installed Arduino
libraries folder on your filesystem here:
- On Windows, this defaults to
- On Mac,
|Arduino Library directory on Windows||Arduino Library directory on Mac|
You’ll note that the
libraries folder contains raw source and not pre-compiled binaries. The Arduino IDE compiles the underlying library files differently depending on the selected board.
Now, return to the OLED lesson and work on wiring up your display!