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.

Next article How to make an interactive sound wave print

Check out our latest products...

Qwiic Cable - Female Jumper (4-Pin) (Cab-14988) - Cables And Adapters
Sparkfun Basic Flashlight Soldering Kit (Kit-14877) - Kits
Pi Model B+ / Pi 2 / Pi 3 Case Base - Smoke Gray (Id: 2256) - Raspberry Pi Enclosures
I2C Encoder V2 - Accessories And Breakout Boards

I2C Encoder V2

£5.99 inc VAT
£4.99 ex VAT
Arduino Mkr Eth Shield - Accessories And Breakout Boards

Arduino MKR ETH Shield

£25.99 inc VAT
£21.66 ex VAT
Arduino Mkr 485 Shield - Accessories And Breakout Boards

Arduino MKR 485 Shield

£31.99 inc VAT
£26.66 ex VAT
Arduino Mkr Can Shield - Accessories And Breakout Boards

Arduino MKR CAN Shield

£31.99 inc VAT
£26.66 ex VAT
Arduino Mkr Mem Shield - Accessories And Breakout Boards

Arduino MKR Mem Shield

£19.99 inc VAT
£16.66 ex VAT