Add Libraries To Arduino

Installing Additional Arduino Libraries

  1. Add Library To Arduino Sketch
  2. How To Add Libraries To Arduino Ide
  3. How To Add Libraries To Arduino
  4. Add Library To Arduino Ide
  5. How To Add Libraries To Arduino From Github

Add Library To Arduino Sketch

On this page... (hide)

  • How to Install a Library
  • Add the library¶ Also there are two ways to add a library to Arduino IDE. 1.Add ZIP Library¶ Since you have downloaded the zip Library, open your Arduino IDE, click on Sketch Include Library Add.ZIP Library. Choose the zip file you just downloaded,and if the library install correct, you will see Library added to your libraries in the.
  • How to Install an Arduino Library via the Add.ZIP Library. Not all Arduino libraries are available via the Arduino Software IDE Library Manager, 3rd party libraries for example can be installed via a zip file. To import a.zip file go to “Sketch” “Include Library” “Add.ZIP Library”.

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

Now the new library will be available in the Sketch Include Library menu. If you want to add your own library to Library Manager, follow these instructions. The process of setting up libraries on the online IDE (Arduino Web Editor) is quite similar to the offline one: 1. Login to the Arduino Web Editor.

What are Libraries?

Libraries are a collection of code that makes it easy for you to connect to a sensor, display, module, etc. For example, the built-in LiquidCrystal library makes it easy to talk to character LCD displays. There are hundreds of additional libraries available on the Internet for download. The built-in libraries and some of these additional librariesare listed in the reference. To use theadditional libraries, you will need to install them.

How to Install a Library

Using the Library Manager

Add Libraries To Arduino

To install a new library into your Arduino IDE you can use the Library Manager (available from IDE version 1.6.2).Open the IDE and click to the 'Sketch' menu and then Include Library > Manage Libraries.

Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation. In this example we will install the Bridge library. Scroll the list to find it, click on it, then select the version of the library you want to install. Sometimes only one version of the library is available. If the version selection menu does not appear, don't worry: it is normal.

Finally click on install and wait for the IDE to install the new library. Downloading may take time depending on your connection speed.Once it has finished, an Installed tag should appear next to the Bridge library. You can close the library manager.

You can now find the new library available in the Sketch > Include Library menu.If you want to add your own library to Library Manager, follow these instructions.

Importing a .zip Library

Libraries are often distributed as a ZIP file or folder. The name of the folder is 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. Starting with version 1.0.5, you can install 3rd party libraries in the IDE. Do not unzip the downloaded library, leave it as is.

In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library. At the top of the drop down list, select the option to 'Add .ZIP Library'.

You will be prompted to select the library you would like to add. Navigate to the .zip file's location and open it.

Return to the Sketch > Include Library menu. menu. You should now see the library at the bottom of the drop-down menu. It is ready to be used in your sketch.The zip file will have been expanded in the libraries folder in your Arduino sketches directory.

NB: the Library will be available to use in sketches, but with older IDE versions examples for the library will not be exposed in the File > Examples until after the IDE has restarted.

Manual installation

When you want to add a library manually, you need to download it as a ZIP file, expand it and put in the proper directory. The ZIP file contains all you need, including usage examples if the author has provided them. The library manager is designed to install this ZIP file automatically as explained in the former chapter, but there are cases where you may want to perform the installation process manually and put the library in the libraries folder of your sketchbook by yourself.
You can find or change the location of your sketchbook folder at File > Preferences > Sketchbook location.


Go to the directory where you have downloaded the ZIP file of the library


Extract the ZIP file with all its folder structure in a temporary folder, then select the main folder, that should have the library name


Copy it in the “libraries” folder inside your sketchbook.

How To Add Libraries To Arduino Ide


Start the Arduino Software (IDE), go to Sketch > Include Library. Verify that the library you just added is available in the list.


Please note: Arduino libraries are managed in three different places: inside the IDE installation folder, inside the core folder and in the libraries folder inside your sketchbook. The way libraries are chosen during compilation is designed to allow the update of libraries present in the distribution. This means that placing a library in the “libraries” folder in your sketchbook overrides the other libraries versions.
The same happens for the libraries present in additional cores installations. It is also important to note that the version of the library you put in your sketchbook may be lower than the one in the distribution or core folders, nevertheless it will be the one used during compilation. When you select a specific core for your board, the libraries present in the core’s folder are used instead of the same libraries present in the IDE distribution folder.
Last, but not least important is the way the Arduino Software (IDE) upgrades itself: all the files in Programs/Arduino (or the folder where you installed the IDE) are deleted and a new folder is created with fresh content.
This is why we recommend that you only install libraries to the sketchbook folder so they are not deleted during the Arduino IDE update process.


This tutorial based on text by Limor Fried.
Last revision 2017/02/07 by SM


The text of the Arduino getting started guide is licensed under aCreative Commons Attribution-ShareAlike 3.0 License. Code samples in the guide are released into the public domain.

edit

Here we will show you how to install an Arduino library. You should notice that almost all of our library was stored at Github. We will provide Arduino library when a product need a library. For some simple product, there is no need to write a library such as Grove - Button.

Download the Library¶

There are two ways to download a Arduino library.

1.Download in the product page¶

Normally, if a product needs a library, you will find a download library button bar like this below:

Click on the button to start downloading. Seconds you will get a package.

2.Download from github¶

If you need to download from a Github page, then you can click on the Clone or download >Download ZIP button to get the library package.

Add the library¶

Also there are two ways to add a library to Arduino IDE.

1.Add ZIP Library¶

Since you have downloaded the zip Library, open your Arduino IDE, click on Sketch > Include Library > Add .ZIP Library.

Choose the zip file you just downloaded,and if the library install correct, you will see Library added to your libraries in the notice window. Which means the library is installed successfully.

2.Add Library folder manually¶

How To Add Libraries To Arduino

Sometimes you can not add a ZIP library correctly, because the root folder of the Zip Library lacks of .cpp or .h file, the Arduino can not recognize. Then you can Unzip the zip file and copy the Library folder into the following path ...Arduinolibraries. ....** is the path you setup Arduino. In my case is **D:WorkworkSoftwareArduinolibraries.

Check¶

Then let's check if the library install correctly.

When you add a library successfully, there will be a demo in the Example. In this case, click on File > Example > OLED_Display_96x96-master > OLED_Hello_World to open an example, click on the Verify button, if there's no error, congratulation, the library is installed perfectly.

Add Library To Arduino Ide

Tech Support¶

How To Add Libraries To Arduino From Github

Please submit any technical issue into our forum.