Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The library will be named “blinkLED” and will be located in the libraries folder (see Recipe 16.2); create a subdirectory named blinkLED in the libraries folder and move blinkLED.h and blinkLED.cpp into it.
The blinkLED function from
Recipe 7.1 is moved out of the sketch
and into a library file named blinkLED.cpp (the .cpp extension stands for “C plus plus” and
contains the executable code).
The terms functions and
methods are used in Arduino library documentation
to refer to blocks of code such as blinkLED. The term
method was introduced to refer to the functional
blocks in a class. Both terms refer to the named functional blocks
that are made accessible by a library.