10 Creating Your Own Arduino Libraries

In this chapter you will

  • Learn the components of an Arduino library
  • Create a simple library for a repetitive task
  • Learn how to install your library in the Arduino IDE
  • Create a library that accepts values to perform a function
  • Create a library that processes data from a sensor and returns values in an easy-to-use form

Recall Project 22, described in Chapter 7, where you installed an Arduino library that included the functions needed to save data to an SD card. Using the library reduced the amount of time needed to write a sketch, as the library provides the functions related to the card module.

In the future, as you write sketches to solve your own problems and perform your own tasks, you may find ...

Get Arduino Workshop, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.