Installing Additional Libraries For Arduino

Once you are comfortable with the Arduino software and using the built-in functions, you may want to extend the ability of your Arduino with its additional libraries.

Arduino Offical Logo

How to Install a Library

Arduino libraries are often distributed as a ZIP file or folder.
The name of the folder is assumes at the name of the library. Inside the folder will be a .cpp file, a .h file and often a keywords .txt file, examples folder, and other files required by the library. 

STEP 1:To install the library, first close the Arduino IDE application. 

STEP 2: Then uncompress/extract the ZIP file containing the library. For example, if you're installing a library called "xyz", uncompress It should contain a folder called xyz, with files like xyz.cpp and xyz.h inside. (If the .cpp and .h files aren't in a folder, you'll need to create one. In this case, you'd make a folder called "xyz" and move into it all the files that were in the ZIP file, like xyz.cpp and xyz.h.)
STEP 3: Drag the xyz folder into this folder (your Arduino libraries folder). In Windows, it will likely be seen in "X:\\Arduino\\libraries". For Mac users, it will likely be called "X:/Arduino/libraries". On Linux, it will be the "libraries" folder in your sketchbook. Here X is the root of the partition in which the arduino is being installed.

Your Arduino library folder should now look like this (on Windows): 
or like this (on Mac): 
& similarly for Linux.
There may be more files than just the .cpp and .h files, just make sure they're all there, is they are found in the package initially. Because there may be a case that those additional libraries are also fetching some of its functions form those additional files.
NOTE: (The library won't work if you put the .cpp and .h files directly into the libraries folder or if they're nested in an extra folder. For example: 
  X:\Arduino\libraries\xyz.cpp and
So be careful in this regards.

STEP 4: Restart the Arduino application. Make sure the new library appears in the Sketch->Import Library menu item of the software.
That's it! You've just installed an Arduino library!

 Learn how to write your own Arduino Library, Click Here to know.