User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arduino:libraryinstall [2010/02/11 18:13]
arduino:libraryinstall [2016/01/28 18:05] (current)
Line 1: Line 1:
-====== ​What is a Library? ====== +====== ​Moved! ======
- +
-Libraries are great places, and not yet illegal in the United StatesIf you ever need to learn how to do something, like say fix a motorcycle, you can go to your local library and take out a book. Sure you could buy the book but the library is nice because as a resource you can get the book whenever you need it, keeping your house uncluttered. +
- +
-Software Libraries are very similar. We already studied what a procedure is, in [[http://​​learn/​arduino/​lesson3.html|lesson 3]]: a procedure is a list of things to do. A library is a big collection of procedures, where all the procedures are related! If you, say, want to control a motor, you may want to find a Motor Control Library: a collection of procedures that have already been written for you that you can use without having to do the dirty work of learning the nuances of motors. +
- +
-For example, this is the Serial Library, which allows the Arduino to send data back to the computer: +
- +
-{{http://​​images/​arduino/​serial%20library.gif}} +
- +
-====== Using libraries ====== +
- +
-One of the best features of the Arduino project is the ability to add on pre-crafted libraries that add hardware support. There'​s tons of them, and you can pick and choose which to install. They'​re only loaded in when the sketch you're working on needs them, so for the most part you can download and stash them for future use. +
- +
-Sketches will often **depend** on libraries, you can see what they are by looking at the top of the sketch. If you see something like <​code>#​include <​FatReader.h></​code>​ that means that you'll need a library called FatReader or a library that contains the file FatReader. If you dont have it installed you'll get an error: +
- +
-{{http://​​images/​arduino/​fatreadernoliberror.gif}} +
- +
-====Installing libraries ​===== +
- +
-OK so now to the good stuff, how to download and install libraries. A library is a folder with some files in it, the files will end in **.cpp** (C++ code file) and **.h** (C++ header file). There may also be some **.o** files. The **.o** files are C++ compiled Objects. If you end up working on the library and modifying it, be sure to delete the **.o** files as that will force the Arduino IDE to recompile the modified ​ **.cpp**'​s into fresh **.o**'​s+
 +This tutorial has moved to [[http://​​arduino-tips-tricks-and-techniques/​arduino-libraries|http://​​arduino-tips-tricks-and-techniques/​arduino-libraries]]
/home/ladyada/public_html/wiki/data/attic/arduino/libraryinstall.1265911991.txt.gz · Last modified: 2016/01/28 18:05 (external edit)