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