Using libraries
We can connect sensors to our Arduino-based microcontroller boards using the I2C and SPI protocols. We can also make use of the sensors and components quicker and easier using a library. Let’s take a closer look at these areas now. We’ll start with libraries.
How do we use a library?
You will use the Library Manager a lot when you’re making your wearables. Libraries provide your sketches with extra functionality. What are libraries? The Arduino website says, “Libraries are a collection of code that makes it easy for you to connect to a sensor, display, module, etc. There are hundreds of additional libraries available on the Internet for download.”
They can be written by anyone, and you can create your own and share it. When I last checked, there were over 4,000 libraries! Libraries are used in many of the sketches we write in the Arduino IDE. We can easily install them and, typically, they include sample code to help us get...