In Arduino, a library is a collection of pre-written code that can be easily added to an Arduino sketch (program) to add functionality. These libraries provide a simple way to access advanced functionality without having to write the code from scratch. There are libraries available for a wide range of functions, such as: Controlling sensors