All About Arduino Libraries



Similar documents
Installing TestNav Mac with Apple Remote Desktop

Uninstalling the software Uninstallation procedure is different between Mac OS X 10.5 and 10.6 & Please follow the instruction below.

How to Install Applications (APK Files) on Your Android Phone

Management Website User Guide. SecureAnywhere AntiVirus SecureAnywhere Internet Security Plus SecureAnywhere Complete

2.2" TFT Display. Created by Ladyada. Last updated on :15:09 PM EDT

ANYWHERE POLLING - POLLING WITH A QUESTION LIST

Installing S500 Power Monitor Software and LabVIEW Run-time Engine

How To Upload To Google Drive On Pc Or Mac Or Mac (Or Mac) On Pc (Or Pc Or Ipad) On A Pc Or Pc Or Minecraft (Or Minecraft) On Your Computer Or Mac) Or Ipa (Or

Suite. How to Use GrandMaster Suite. Exporting with ODBC

Allworx OfficeSafe Operations Guide Release 6.0

Installing the Android SDK

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Stored Documents and the FileCabinet

Installing (1.8.7) 9/2/ Installing jgrasp

Client Portal User Guide

7.0 BW Budget Formulation Report Tips and Tricks

Arduino Lesson 0. Getting Started

Installing and Using No Machine to connect to the Redhawk Cluster. Mac version

Board also Supports MicroBridge

How To Create A Multi-Version Bootable Windows 7 USB Drive

EViews supports online access to EIA data via the EIA web server as well as offline access to data downloaded in the EIA Bulk File format.

Installing the USB driver for Firmware 7 or later For use with E-blocks programmer boards and PICmicro Development boards.

Medicare Remit Easy Print (MREP) Software Provider/Supplier MREP Help

FreeAgent DockStar Network Adapter User Guide

WA2192 Introduction to Big Data and NoSQL. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

TRIM: Web Tool. Web Address The TRIM web tool can be accessed at:

Mimeo Printer User Guide

Frequently Asked Questions

Colligo Manager 6.2. Offline Mode - User Guide

Waspmote IDE. User Guide

Instructions for the installation of drivers and data reading software (TOOLBOX 4) The simple and reliable way to measure radioactivity.

IT Quick Reference Guides Using Windows 7

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Sendspace Wizard Desktop Tool Step-By-Step Guide

Google Drive: Access and organize your files

2. Installation Instructions - Windows (Download)

M a r k B o o k C Y, M a r k B o o k A M, v e r s i o n, e d i t i o n. MarkBook for Windows on a Mac 1

, SHAPE Services

Setting Up Database Security with Access 97

Suggestions and Tips for Managing and Uploading Files for the AEP Application

User s Guide For Department of Facility Services

SharePoint List Filter Favorites Installation Instruction

Thermomark Roll - Driver Installation - Windows 7

Driver Updater Manual

CSA Software Listing Table of Contents. Both Windows and Mac platforms are supported.

State of Michigan Data Exchange Gateway. Web-Interface Users Guide

Thinix WiFi Hotspot User Manual

What Do I Need To Create a Visualization For ScreenPlay?

Upgrading from Windows XP to Windows 7

CCH Axcess Portal Client User Guide

ultimo theme Update Guide Copyright Infortis All rights reserved

NetClient CS Document Management Portal User Guide. version 9.x

How to Configure Windows 7 to run ereports on IE 11

Changing Your Cameleon Server IP

Getting started with 2c8 plugin for Microsoft Sharepoint Server 2010

This means that any user from the testing domain can now logon to Cognos 8 (and therefore Controller 8 etc.).

To download and install directly to your phone

How to Back Up and Restore an ACT! Database Answer ID 19211

Create a GAME PERFORMANCE Portfolio with Microsoft Word

Web Connect Guide MFC-J825DW MFC-J835DW. Version 0 USA

Accessing Windows 7 in the Student Labs

1.1 Installing Protégé You can follow the steps below to download and install Protégé from the source.

Loss of data can happen in many ways. One of the most common causes is hard drive failure. Hard drives can die without warning.

TAMUS Terminal Server Setup BPP SQL/Alva

SAS 9.4 PC Files Server

PeopleTools v8.52 Crystal Reports and nvision for Windows 7 Workstation Installation Guide

About SharePoint Server 2007 My Sites

Poseidon for UML. Elizabeth Graham

Digital Persona Fingerprint Reader Installation

Upgrading from Windows XP to Windows 7

Sharing Your Media Library with Roxio Streamer

Installing Your Software

How to Configure Windows 8.1 to run ereports on IE11

Boot Camp Installation & Setup Guide

Windows 7 Hula POS Server Installation Guide

Attach receipt options:

Windows Vista /Windows 7 Installation Guide

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

Medicare Remit Easy Print (MREP) Software MAC/ DME MAC MREP Help

It is recommended that you use a clean installation of Lion client before upgrading to Lion Server.

FTP Over SSL (FTPS) Core FTP LE. Installing Core FTP LE"

Using Microsoft Word. Working With Objects

EasyC. Programming Tips

How to Make a USB Bootable

Using an Edline Gradebook. EGP Teacher Guide

XConsole GUI setup communication manual September 2010.

einstruction CPS (Clicker) Instructions

Bluetooth Installation

How to program a Zumo Robot with Simulink

Firmware Update Instructions for Crucial Client SSDs

Clavia USB Driver v2.06. Manual driver installation, Windows XP. Clavia USB Driver v2.06

KeePass Getting Started on Windows

City of De Pere. Halogen How To Guide

McAfee Host Intrusion Prevention Patch 6 Software

Many home and small office networks exist for no

THERMOMARK CARD - Driver Installation - Windows XP

Pershing LLC. All rights reserved. Pershing, NetExchange Pro and InfoDirect FTP are registered trademarks of Pershing Investments LLC.

Producing Standards Based Content with ToolBook

Transcription:

All About Arduino Libraries Created by William Earl Last updated on 2014-04-17 08:45:25 AM EDT

Guide Contents Guide Contents Arduino Libraries Standard Libraries User Installed Libraries Where to Install your Libraries Locate your Sketchbook Folder and the Libraries Folder Inside Open the Preferences Dialog Find the Sketchbook Location Create a Libraries Folder Rename to "Libraries" Installing a Library on Windows Close the Arduino IDE Download the Zip File Open the Zip File Paste into your Libraries Folder Give it a Legal Name Re-start the IDE Verify that it Compiles Installing a Library on Mac OSX Close the Arduino IDE Download the Zip File Find it in the Downloads Folder Drag it to your Libraries Folder Give it a Legal Name Re-start the IDE Verify that it Compiles Installing a Library on Linux Close the Arduino IDE Download the Zip File Save the Zip File Open the Zip File 2 4 4 4 6 6 7 7 7 8 9 9 9 9 9 9 10 10 11 11 11 11 11 11 12 12 13 13 13 13 13 Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 2 of 17

Start the Extraction Extract into your Libraries Folder Give it a Legal Name Re-start the IDE Verify that it Compiles Common Library Problems 'xxxx' does not name a type Wrong Folder Location Don't have a "Sketchbook" folder Incomplete Library Wrong Folder Name Wrong Library Name Multiple Versions Library Dependencies Core Libraries Forget to shutdown the IDE 14 14 14 14 14 15 15 15 16 16 16 16 16 16 16 17 Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 3 of 17

Arduino Libraries Arduino libraries are a convenient way to share code such as device drivers or commonly used utility functions. This guide details how to install libraries on your computer. For an excellent introduction to Arduino libraries and what you can do with them, see the Libraries page from Arduino Tips, Tricks and Techniques (http://adafru.it/ayg). There are two general types of Arduino Libraries: Standard Libraries The Arduino IDE comes with a set of standard libraries for commonly used functionality. These libraries support all the examples included with the IDE. Standard library functionality includes basic communication functions and support for some of the most common types of hardware like: Servo Motors and Character LCD displays. Standard Libraries are pre-installed in the "Libraries" folder of the Arduino install. If you have multiple versions of the IDE installed, each version will have its own set of libraries. Fo r the most part, it is not a good idea to change the Standard Libraries or install your libraries in the same folder. User Installed Libraries There are many other libraries with useful functionality and device drivers for all sorts of Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 4 of 17

hardware. These drivers are available from places like Arduino Playground, Github and Google Code. Adafruit provides over 100 libraries libraries supporting almost all of our Arduino compatible products. Most of our libraries are hosted on GitHub (http://adafru.it/ayh). Direct links are provided from the product description and/or tutorial pages. User installed libraries should be installed in your sketchbook libraries folder so they can be used with all versions of the IDE. This way, if a new version of the IDE is released, you don't have to re-install all your favorite libraries! Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 5 of 17

Where to Install your Libraries It is important to install your libraries in the correct location. Otherwise the compiler will not be able to locate them when you try to compile and upload your sketches. Locate your Sketchbook Folder and the Libraries Folder Inside Your sketchbook folder is the folder where the Arduino IDE stores your sketches. This folder is automatically created by the IDE when you install it. On Linux machines, the folder is named "Sketchbook" and it is typically located in /home/<username> On Windo ws and Macinto sh machines, the default name of the folder is "Arduino" and is located in your Documents folder. This is a common source of confusion on Windows and Mac machines, your sketchbook folder is not named "sketchbook" it is named "Arduino"! User installed libraries should go in a folder named "Libraries", located inside your sketchbook folder. This is where the IDE will look for user installed libraries. On version 1.0.2 and later of the Arduino IDE, the "Libraries" folder is created automatically. On earlier versions of the IDE, you may need to create it when you install your first library. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 6 of 17

Open the Preferences Dialog Click "File->Preferences" in the IDE. Find the Sketchbook Location Usually a folder named "Arduino" in your Documents folder. Once you know the location, navigate to this folder in Windows Explorer. Create a Libraries Folder If there is no Libraries folder there, create one. Right click in Windows Explorer and select "New- >Folder". Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 7 of 17

Rename to "Libraries" Right click on the "New Folder" and select "Rename". Then type in "Libraries". Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 8 of 17

Installing a Library on Windows Follow these steps to install a library in Windows. Close the Arduino IDE First make sure that all instances of the Arduino IDE are closed. The IDE only scans for libraries at startup. It will not see your new library as long as any instance of the IDE is open! Download the Zip File Click the "Zip" button on the Github repository page. Open the Zip File Open the Zip File and copy the library master folder. Paste into your Libraries Folder Open your sketchbook Libraries folder and paste the master folder you copied from the.zip. Give it a Legal Name The IDE will not recognize folders with dashes in the name. So you must rename the Github Master Folder. Underscores are OK! Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 9 of 17

Re-start the IDE Restart the Arduino IDE and verify that the library appears in the File->Examples menu. Load one of the library examples to test. Verify that it Compiles Click the check-mark icon in the upper left and verify that the example sketch compiles without errors. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 10 of 17

Installing a Library on Mac OSX Follow these steps to install a library in Mac OSX. Close the Arduino IDE First make sure that all instances of the Arduino IDE are closed. The IDE only scans for libraries at startup. It will not see your new library as long as any instance of the IDE is open! Download the Zip File Click the "Zip" button on the Github repository page. Find it in the Downloads Folder OSX will automatically open the zip file there. Drag it to your Libraries Folder Open your sketchbook Libraries folder and drag the master folder from Downloads into it. Give it a Legal Name The IDE will not recognize folders with dashes in the name. So you must rename the Github Master Folder. Underscores are OK! Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 11 of 17

Re-start the IDE Restart the Arduino IDE and verify that the library appears in the File->Examples menu. Load one of the library examples to test. Verify that it Compiles Click the check-mark icon in the upper left and verify that the example sketch compiles without errors. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 12 of 17

Installing a Library on Linux Follow these steps to install a library in Linux. Close the Arduino IDE First make sure that all instances of the Arduino IDE are closed. The IDE only scans for libraries at startup. It will not see your new library as long as any instance of the IDE is open! Download the Zip File Click the "Zip" button on the Github repository page. Save the Zip File Save the zip file to a convenient location. Open the Zip File Open the Zip File and copy the library master folder. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 13 of 17

Start the Extraction Select "Extract" from the menu and navigate to your Sketchbook/Libraries folder Extract into your Libraries Folder After navigating to the sketchbook/libraries folder, complete the extraction. Give it a Legal Name The IDE will not recognize folders with dashes in the name. So you must rename the Github Master Folder. Underscores are OK! Re-start the IDE Restart the Arduino IDE and verify that the library appears in the File->Examples menu. Load one of the library examples to test. Verify that it Compiles Click the check-mark icon in the upper left and verify that the example sketch compiles without errors. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 14 of 17

Common Library Problems 'xxxx' does not name a type This is the most common library related error message and it means that the compiler could not find the library. This can be due to: Library is not Installed (see previous pages in this guide) Wrong Folder Location Wrong Folder Name Wrong Library Name Library Dependencies Forgot to Shutdown the IDE See below for solutions to these problems. Wrong Folder Location The IDE will only find standard libraries and libraries installed in the sketchbook Libraries folder. It will not be able to find libraries installed elsewhere. The Library folder must be at the top level of the Libraries folder. If you put it in a sub-folder, the IDE will not find it. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 15 of 17

No te: Some third-party library repositories have different folder structures. You may need to re-arrange things to make sure that the library files are at the top level of the folder. WaveHC is one example of this. The actual library folder is a folder within the top-level repository folder. Don't have a "Sketchbook" folder It is there. But on a Windows or Mac/OSX machine it may not be named "Sketchbook". See the page titled "Where to Install your Libraries". Incomplete Library You must download and install the entire library. Do not omit or alter the names of any files inside the library folder. Wrong Folder Name The IDE will not load files with certain characters in the name. Unfortunately, it doesn t like the dashes in the zip files names generated by Github. When you unzip the file, rename the folder so that it does not contain any illegal characters. Simply replacing each dash ( - ) with and underscore ( _ ) usually works. Wrong Library Name The name specified in the #include of your sketch must match exactly (including capitalization!) the class name in the library. If it does not match exactly, the IDE will not be able to find it. The example sketches included with the library will have the correct spelling. Just cut and paste from there to avoid typos. Multiple Versions If you have multiple versions of a library, the IDE will try to load all of them. This will result in compiler errors. It is not enough to simply rename the library folder. It must be moved outside of the sketchbook Libraries folder so the IDE won t try to load it. Library Dependencies Some Libraries are dependent on other libraries. For example, most of the Adafruit Graphic Display libraries are dependent on the Adafruit GFX Library. You must have the GFX library installed to use the dependent libraries. Core Libraries Some libraries cannot be used directly. The GFX library is a good example of this. It provides core graphics functionality for many Adafruit displays, but cannot be used without the specific driver library for that display. Adafruit Industries https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use Page 16 of 17

Forget to shutdown the IDE The IDE only searches for libraries at startup. You must shut down ALL instances of the IDE and restart before it will recognize a newly installed library. Adafruit Industries Last Updated: 2014-04-17 08:45:26 AM EDT Page 17 of 17