How to Install Arduino Library: Difference between revisions
Keyestudio (talk | contribs) No edit summary |
Keyestudio (talk | contribs) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Image:Arduino_quickstart.jpg|400px|right|thumb|]] | |||
== Installing Additional Arduino Libraries == | |||
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 additional libraries. | |||
== What are Libraries ? == | |||
[https://www.arduino.cc/en/Reference/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 libraries are listed in the reference. To use the additional libraries, you will need to install them. | |||
== How to Install a Library ? == | |||
Here we will introduce the most simple way for you to add libraries <br> | |||
After download well the Arduino IDE, you can right-click the icon of Arduino IDE.<br> | |||
Find the option "Open file location" shown as below. | |||
<br>[[Image:Libraries 1.png|600px|frameless]]<br> | |||
<br> | <br> | ||
[[Image: | Then, click to open the libraries folder, you can directly add the libraries inside the folder. | ||
<br>[[Image:Libraries 3.png|600px|frameless]]<br> | |||
It is very easy for you to add the libraries in this way! | |||
'''Or you can refer to another method to add libraries.''' <br> | |||
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.<br> | |||
Take Arduino1.0.5 as an example, you can install a library in Arduino IDE. And do not unzip the downloaded library, leave it as is. | |||
*In the Arduino IDE, click Skietch->Import Library. Select “Add Library...” at the top of the drop down list. <br>[[Image:Add Library.png|600px|frameless]]<br> | |||
*You will be prompted to select the library you would like to add. Find the .zip file's location and open it. Here I select a library named smallePaper. <br>[[Image:smallePaper.png|500px|frameless]]<br> | |||
* | |||
<br>[[Image: | |||
* | *Return to the Sketch > Import Library menu. You should now see the library at the bottom of the drop-down menu. It is ready to be used in your sketch. <br>[[Image:your sketch.png|600px|frameless]]<br> | ||
<br>[[Image: | |||
* | *Now the zip file has been installed in your Arduino sketches directory. You can see the location of the library: File->Preferences->Sketchbook location, and can change the location. Generally, we will change it as ….Arduino – 1.0.5\libraries as shown below. <br>[[Image:below.png|600px|frameless]]<br> | ||
<br>[[Image: | |||
'''More reference please click the link here:''' <br> | |||
https://www.arduino.cc/en/Guide/Libraries | |||
Latest revision as of 14:12, 21 May 2018
Installing Additional Arduino Libraries
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 additional libraries.
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 libraries are listed in the reference. To use the additional libraries, you will need to install them.
How to Install a Library ?
Here we will introduce the most simple way for you to add libraries
After download well the Arduino IDE, you can right-click the icon of Arduino IDE.
Find the option "Open file location" shown as below.
Then, click to open the libraries folder, you can directly add the libraries inside the folder.
It is very easy for you to add the libraries in this way!
Or you can refer to another method to add libraries.
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.
Take Arduino1.0.5 as an example, you can install a library in Arduino IDE. And do not unzip the downloaded library, leave it as is.
- In the Arduino IDE, click Skietch->Import Library. Select “Add Library...” at the top of the drop down list.
- You will be prompted to select the library you would like to add. Find the .zip file's location and open it. Here I select a library named smallePaper.
- Return to the Sketch > Import Library menu. You should now see the library at the bottom of the drop-down menu. It is ready to be used in your sketch.
- Now the zip file has been installed in your Arduino sketches directory. You can see the location of the library: File->Preferences->Sketchbook location, and can change the location. Generally, we will change it as ….Arduino – 1.0.5\libraries as shown below.
More reference please click the link here:
https://www.arduino.cc/en/Guide/Libraries