Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Discussion

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).

Note

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial