Skip to Content
Arduino: A Technical Reference
book

Arduino: A Technical Reference

by J. M. Hughes
May 2016
Beginner to intermediate content levelBeginner to intermediate
638 pages
17h 40m
English
O'Reilly Media, Inc.
Content preview from Arduino: A Technical Reference

Chapter 7. Arduino Libraries

The Arduino IDE comes with a collection of libraries that can be used with program sketches. These contain functions to access peripheral devices like an Ethernet interface, a liquid crystal display, a conventional serial interface, and many others.

Note that although the term “library” is used to describe auxiliary code, the modules themselves aren’t always what one might think of as a library in the sense of a precompiled module, such as the .a (archive) or .so (shared object) libraries in Unix or Linux. In many cases they’re just standard C or C++ source files (with AVR-GCC limitations, of course), but the end result is largely the same. Library code is compiled as necessary along with the sketch code into object files and linked with the sketch (see Chapters 5 and 6). In other cases a library really is a binary object, such as the components supplied with the avr-libc library suite. If you want to know where a library or external code module is coming from, check both the avr-libc documentation and the Arduino documentation.

After a program sketch and any library modules are compiled, the linker utility resolves the address references between the library components and the user-supplied functions, and then binds all the components into one executable binary image. The AVRDUDE utility employed by the IDE (discussed in Chapter 6) handles the process of interacting with the on-board bootloader (covered in Chapter 5) to transfer the compiled binary ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Arduino for Arduinians

Arduino for Arduinians

John Boxall

Publisher Resources

ISBN: 9781491934319Errata Page