How to install libraries when using the Arduino IDE

Using libraries when programming can save a huge amount of both time and effort but what are they? what do they do? and how do I install them? Well we hope by reading this you'll understand the concept of libraries and how to use them in the Arduino IDE.

So what is a library and what do they do?

A software library is a collection code, classes, procedures, examples and much more that aims to allow users to achieve more functionality without having to write long and complex code themselves. 

Most libraries for use with the Arduino IDE include examples which can help to understand how the library is designed to be used and the functionality it can provide. Example code for libraries can be found be selecting File > Examples from the menu in the top left of the Arduino IDE.

 

Library Manager

The Arduino IDE has a handy Library Manager which lets you view all of the libraries you have installed and also install some common libraries. You can search for libraries using keywords such as the board name. It can be found by selecting Sketch > Include Library > Manage Libraries. 

 

Installing a library manually

Make sure you have the library you wish to install downloaded in a known location on you computer. For this guide we'll be using the Gameduino library as an example. Once you have it downloaded and know where it is saved open up the Arduino IDE and from the menu in the top left select Sketch > Include Library > Add .ZIP Library.

 

 

This will open a pop-up window where you should navigate to the location of the downloaded file and click Open.

You can now verify that the library has been installed by searching for it in the Library Manager or by checking for the Examples which can be found under File > Examples and then the library name selected.

As always we love to hear about what you're working on and possibly share it with our following. If you have any further questions about the Arduino IDE or anything else please don't hesitate to contact us.

Previous article OnionOS just got better!
Next article How to make an interactive sound wave print

Check out our latest products...

TFT LCD Breakout - 1.8 (128x160) (LCD-15143) - LCD Displays
Qwiic Scale - NAU7802 (SEN-15242) - Sensor

Qwiic Scale - NAU7802 (SEN-15242)

£13.99 inc VAT
£11.66 ex VAT
VEML7700 Lux Sensor - I2C Light Sensor (ID:4262) - Visible Light
11x7 LED Matrix Breakout - LED Displays

11x7 LED Matrix Breakout

£8.99 inc VAT
£7.49 ex VAT
What The Flex - Accessories and Breakout Boards

What The Flex

£5.99 inc VAT
£4.99 ex VAT
GNSS Chip Antenna Evaluation Board (GPS-15247) - GPS
Molex Flexible GNSS Antenna - U.FL (Adhesive) (GPS-15246) - GPS
GPS Breakout - Chip Antenna SAM-M8Q (Qwiic) (GPS-15210) - GPS