Overview

The Adafruit_GFX library for Arduino provides a common syntax and set of graphics functions for all of our LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss…and any new features, performance improvements and bug fixes will immediately apply across our complete offering of color displays.

The Adafruit_GFX library can be installed using the Arduino Library Manager…this is the preferred and modern way. From the Arduino “Sketch” menu, select “Include Library” then “Manage Libraries…”

Type “gfx” in the search field to find it quickly:

While you’re there, also look for and install the Adafruit_ZeroDMA library.

The Adafruit_GFX library always works together with an additional library unique to each specific display type — for example, the ST7735 1.8" color LCD requires installing Adafruit_GFX, Adafruit_ZeroDMA and the Adafruit_ST7735 library. The following libraries now operate in this manner:

The libraries are written in C++ for Arduino but could easily be ported to any microcontroller by rewriting the low-level pin access functions.

The Old Way

Older versions of the Arduino IDE software require installing libraries manually; the Arduino Library Manager did not yet exist. If using an early version of the Arduino software, this might be a good time to upgrade. Otherwise, this tutorial explains how to install and use Arduino libraries. Here are links to download the GFX and ZeroDMA libraries directly (use the links above to get the corresponding display-specific libraries):

This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012. This page (Overview) was last updated on Dec 11, 2018.