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_BusIO library (or…newer Arduino IDE versions install this dependency automatically).
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_BusIO and the Adafruit_ST7735 library. The following libraries now operate in this manner:
- RGBmatrixPanel, for our 16x32 and 32x32 RGB LED matrix panels.
- Adafruit_TFTLCD, for our 2.8" TFT LCD touchscreen breakout and TFT Touch Shield for Arduino.
- Adafruit_HX8340B, for our 2.2" TFT Display with microSD.
- Adafruit_ST7735, for our 1.8" TFT Display with microSD.
- Adafruit_PCD8544, for the Nokia 5110/3310 monochrome LCD.
- Adafruit-Graphic-VFD-Display-Library, for our 128x64 Graphic VFD.
- Adafruit-SSD1331-OLED-Driver-Library-for-Arduino for the 0.96" 16-bit Color OLED w/microSD Holder.
- Adafruit_SSD1306 for the Monochrome 128x64 and 128x32 OLEDs.
- and many many others!
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 BusIO libraries directly (use the links above to get the corresponding display-specific libraries):