O'Reilly logo

Pro Arduino by Dan Cervo, Rick Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 12

image

Writing Your Own Arduino Libraries

Arduino libraries are written in standard C/C++ code and contain either a set of useful functions or an object that is initialized and used in Arduino sketches. The advantage of this is that you can share these libraries across your own projects and with other users. In this chapter, we will create an example “Hello World” library, a Motor control library, and a more complex DS1631 I2C temperature sensor library.

What you need to know to write your own libraries

The choice to program libraries in C or C++ is up to you. Standard C works when using the Arduino library conventions. If you plan to use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required