Framework (A-Z)

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.

Name

#include

Examples
#include "LiquidCrystal.h"  // includes the LiquidCrystal library in the sketch

LiquidCrystal myDisplay = LiquidCrystal(8,9,10,2); 
int a = 0;

void setup()
{

}

void loop()
{
  myDisplay.clear();
  myDisplay.home();
  myDisplay.print("Variable a is: ");
  myDisplay.setCursor(16, 0);
  myDisplay.print(a);
  a = a + 1;
  delay(200);
}
Description the #include directive is used to import an external library into a sketch. An #include directive is automatically added to the sketch after using the Sketch/Import Library menu and selecting a library to include. Note the directive special syntax, unlike other wiring commands it doesn´t ends with a semicolon. In the Wiring environment it is possible to use " " or < > to include a file.
Syntax
#include "library_include_file_name"
Usage Application
Updated on July 07, 2011 11:08:22pm PDT

Creative Commons License