Welcome back to our programming tutorial using the Arduino IDE. Today we will explain how to install a library with the Arduino IDE.
You can take a look at the previous chapters of the course here:
- Arduino IDE: what’s in a library #10
- Arduino IDE: functions and RGB LEDs at work #9.1
- Arduino IDE: knowing and using functions #9
- Arduino IDE: composing songs with an array #8.1
- Arduino IDE: what is an array or a vector #8
- Arduino IDE: RGB LED, for, while, do while loops #7
- Arduino IDE: for loops against while / do while #6
- Arduino IDE: while and do while loops #5
- Arduino IDE: turn on LEDs using a button (if) #4.1
- Arduino IDE: the conditional construction IF #4
- Arduino IDE: arithmetic and logical operators #3
- Arduino IDE: variables, constants and macros #2
- How can I use Arduino IDE to write a program? #1
- Arduino IDE: what it is and how it works #0
The previous article discussed what a library is. Arduino IDE has several libraries implemented and ready to use.
In addition, you are given the opportunity to use libraries created by users, developers, companies or hobbyists. To achieve this, a certain procedure must be followed.
Install libraries from the Arduino IDE management tool
To install a new library, open the Arduino IDE software and click on the upper menu “Sketch”. Once you have done this step click on “#include Library”. Then click on “Library Management”.
After clicking on “Library Management” the management tool will appear on the screen. There will be a list with all the libraries already installed or to be installed.
Furthermore, you are given the option to search (white bar) for the library to be installed. The installation process is fairly self-explanatory. Once you find the library to install, just place the cursor on it and click the install button. The message “INSTALLED” will appear once the installation process is complete.
Importing libraries from .zip files
Many libraries are distributed in .zip files. Inside the compressed file you usually have a .cpp file or a .h or .txt file. To import such libraries, you do not have to extract the package but load the .zip file as it is.
Clicking on “add library from .ZIP file” opens the following window:
To install the .zip library just click omn “Open”. The installation will automatically execute.
Manually installation of libraries
To carry out this procedure, simply download the library and insert it manually into the “libraries” folder contained in the “Arduino” directory. The path on Windows – except for any modifications made by the user – is: C: \ documents \ Arduino \ libraries.
Once the library is installed, it is recommended to restart the Arduino IDE software.
Follow us to keep yourself updated with the news!