If the library you want to use is not available via the library manager, you can get the source code and place it into your machine's local library folder. The location of the folder is rather specific. See the file hierarchy below:
It is important to install your libraries in the correct location. Otherwise the compiler will not be able to locate them when you try to compile and upload your sketches.
Locate your Sketchbook Folder and the Libraries Folder Inside
Your sketchbook folder is the folder where the Arduino IDE stores your sketches. This folder is automatically created by the IDE when you install it. On Linux machines
, the folder is named "Sketchbook" and it is typically located in /home/<username>On Windows and Macintosh machines
, the default name of the folder is "Arduino" and is located in your Documents folder.
This is a common source of confusion on Windows and Mac machines, your sketchbook folder is not named "sketchbook" it is named "Arduino"!
User installed libraries should go in a folder named Libraries, located inside your sketchbook folder. This is where the IDE will look for user installed libraries.
On version 1.0.2 and later of the Arduino IDE, the "Libraries" folder is created automatically. On earlier versions of the IDE, you may need to create it when you install your first library.
This guide was first published on Feb 16, 2013. It was last
updated on Oct 20, 2018.
This page (Where to Install your Libraries) was last updated on Oct 15, 2018.
Open the Preferences Dialog
Click File -> Preferences in the IDE.
Find the Sketchbook Location
Usually a folder named Arduino in your Documents folder.
Once you know the location, navigate to this folder in Windows Explorer or mac Finder
Create a Libraries Folder
If there is no Libraries folder there, create one.
Right click in Windows Explorer and select New -> Folder.
Rename to Libraries
Right click on the New Folder and select Rename. Then type in Libraries.