Understanding Project File Structure

vMicro supports the Arduino hardware specification fully, and we recommend you stick to this to ensure your project remains compatible.

 

Arduino 1.5.x Compatability 

To ensure compatability from 1.5.x onwards, please ensure the project code is structured as below:

\projName\projName.ino
\projName\Another.ino
\projName\src\LibInRoot.h
\projName\src\Lib1\Lib1.h
\projName\src\Lib1\Lib1.cpp

 

The above shows that we can add files within \src\ in the root, or in any folder structure below \src\ and it is included.

Also ensure the #includes in your sketch reference the files using the full relative path:

#include <src\LibInRoot.h>
#include <src\Lib1\Lib1.h>

 

Arduino 1.0.x Compatability

If your project must be compatible with Arduino 1.0.x then the below structure should be followed, however recursive compilation is not available.

\projName\projName.ino
\projName\Another.ino
\projName\LibInRoot.h
\projName\utility\Lib1\Lib1.h
\projName\utility\Lib1\Lib1.cpp

 

Viewing in Visual Studio

Dont forget you can click the "Show All Files" button in the Solution Explorer to view the structure in VS:

 

VS Solution Explorer - Show All Files

Further Information

Arduino Library Specification

Adding and Deleting Source Files

About Projects and Solutions