Tuesday, May 26, 2015

How do you add a new sketch library to Arduino in Visual Studio?



The previous post shows all the libraries in the Arduino 163 nightly builds as seen in the Visual Studio 2013 Community edition's IDE. You can add the library in the list using Visual Studio as shown in the previous post.

What if you want to add a library that is not in the list?

The first thing is for you to find the library or write one.

Let us say, I need to add the WaveHC library. You may want to know what WaveHC library can do. Well WaveHC is an Arduino Library for the Adafruit Wave shield. WaveHC library has four C++ classes.

* SDCard Library
* FATReader
* WaveHC
* WaveUtil

This library turns Arduino into things you can do with audio.

Where do you find WaveHC?

You can find WaveHC here:
I downloaded the wavehc20090418.zip file to work with (hope!) Arduino UNO.

Here is a screenshot.
After downloading I extracted the folder WaveHC and moved it to the following location where it was saved (WaveHC was added to the install directory of Arduino).

C:\Users\Jayaram\Desktop\Arduino163\arduino-nightly-windows\arduino-nightly\libraries

Now I launch Visual Studio and open the sketch project I want to add the library and refresh the libraries (you get a message that the Toolchain reload is complete). It is now added to the libraries accessible via Visual Studio). Now WaveHC is available to add to my existing project:

No comments: