User Tools

Site Tools


arduino:installing_using_third_party_libraries

Installing and using third-party libraries for Arduino

Arduino comes with list of specialized libraries. They are accessible under the Sketch → Import Library… menu. Additional third-party libraries are available for various uses. Installing a new library can be a bit confusing at first. We will run through the various to download, install and use a third-party library called NewSoftSerial.

  1. Download the library (for this example NewSoftSerial) and unzip it.
  2. Examine the unzipped folder, and find the folder containing the main .cpp file. For us, the folder is called NewSoftSerial, and it contains identically named NewSoftSerial.cpp and NewSoftSerial.h files, plus a keywords.txt file and sub-folders.
  3. Open your Sketchbook folder (usually /Users/username/Documents/Arduino on OSX, My Documents/Arduino on Windows, check Arduino's preferences for exact/custom setting). If you have never used Arduino before, it should be empty.
  4. Create a new folder called libraries inside the Arduino folder
  5. Move/copy the third-party library folder (NewSoftSerial in our case) to the libraries folder
  6. Verify that the folder hierarchy is correct, see the reference image below
  7. Quit and relaunch Arduino
  8. Check in the menu Sketch → Import Library… that the new library in showing down the list.
  9. The new library is properly installed and ready to use! Third-party libraries often include relevant examples to help you get started. They should be available under the main Examples list as seen in the following capture
arduino/installing_using_third_party_libraries.txt · Last modified: 2011/08/11 16:20 by camille