title |
---|
Add a library to Arduino IDE |
Libraries are a collection of code that provide extra functionality for use in sketches, for example when working with hardware or manipulating data.
Learn how to add a library to Arduino IDE.
-
In the menu bar, go to
Tools > Manage Libraries...
(In IDE 2, you can also click on the Library Manager icon on the left). -
Search for the library you want to install.
-
Find the library in the search results.
-
Click on the INSTALL button.
-
Wait for the installation to complete.
-
In the menu bar, go to
Sketch > Include Library > Add .ZIP Library...
-
You will be prompted to select the library you want to add. Navigate to the .zip file's location and open it.
-
If you're using Arduino IDE 2.x, you may need to restart it for the library to be available1.
-
Go to the directory where you have downloaded the .zip library file.
-
Extract the .zip file.
-
Select the main folder (it should have the library's name) and move it to the "libraries" folder inside your sketchbook.
-
Restart Arduino IDE.
Note that adding a library to the "libraries" folder in the sketchbook will override other previously installed library versions.
-
Installing libraries in the Arduino IDE 1 on Arduino Docs
-
Installing libraries in the Arduino IDE 2 on Arduino Docs
-
About #include