How to Install Arduino Library: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
(Created page with "<br> 400px|right|thumb| Once you are comfortable with the Arduino software, you may want to extend the library to meet your requirement. <br...")
 
No edit summary
Line 6: Line 6:
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.<br>
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.<br>


Take Arduino1.0.5 as example, you can install a library in Arduino IDE. And do not unzip the downloaded library, leave it as is.<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.<br>


   
   
*In the Arduino IDE, click Skietch->Import Library. At the top of the drop down list, select the option to "Add Library.<br>
*In the Arduino IDE, click Skietch->Import Library. At the top of the drop down list, select the option "Add Library.<br>
<br>[[Image:Add Library.png|600px|frameless]]<br>
<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>
*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>
Line 16: Line 16:
*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>
*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>
<br>[[Image:your sketch.png|600px|frameless]]<br>
<br>[[Image:your sketch.png|600px|frameless]]<br>
*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 showing below.
*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:below.png|600px|frameless]]<br>
<br>
<br>

Revision as of 15:57, 28 August 2017


Arduino quickstart.jpg

Once you are comfortable with the Arduino software, you may want to extend the library to meet your requirement.

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.

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. At the top of the drop down list, select the option "Add Library.


Add Library.png

  • 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 .


SmallePaper.png

  • 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.


Your sketch.png

  • 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.


Below.png