Libraries are files written for the Arduino that allow it to have extra functionality. Lets say there’s a special sensor that is Arduino compatible, then chances are there’ll be a library that will let us easily write programs for it. Lets see the two main ways we can install libraries in Arduino:
Sometimes a library may be available in the form of a .Zip file. We can easily install it by doing a few simple steps.
In the Arduino IDE we go under Sketch > Include Library > Add .Zip Library…
Once the library has been added, it’ll say “Library added to your libraries.”
Other times, there are Arduino libraries that are available online that can be installed through an installer manager in the IDE itself.
In the Arduino IDE we go under Sketch > Include Library > Manage Libraries…
This opens the library manager where we can type something in the search bar, press Enter, and then all available related libraries will appear. In this example, the word “motor” was searched and the results are libraries that are related to motor control. For each result, it provides the name of the library, creator, and install button. You can find the library you want, click “Install”, and the library manager will install that library.