Add Libraries to my projects

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In Atmel Studio 6.2, how do I import libraries such as softwareserial?

 

https://code.google.com/p/arduino/source/browse/trunk/libraries/SoftwareSerial/SoftwareSerial.h?r=1137

 

I am struggling to figure this out. When I add the SoftwareSerial.h to my library folder, I get the below error:

 

Library Error

 

This topic has a solution.

"When all else fails, read the directions"

Last Edited: Wed. Oct 15, 2014 - 12:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need the Arduino library support for that. I think the favoured option for adding that to a plain C++ project in Studio these days is the "visual micro" extension. See:

 

http://www.visualmicro.com/page/...

 

(the old way was simply to get Arduino to build libcore.a then link against that but "Visiual Micro" is a cleaner solution)

Last Edited: Wed. Oct 15, 2014 - 12:16 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks - I have Visual Micro installed, but it seems in order to use the libraries, I need to create a Visual Micro Sketch (.ino). I did find a nice solution, which shows how to import the Arduino core library. It also, works well for adding my own header files.

 

http://www.jayconsystems.com/tutorial/atmerpt2/

"When all else fails, read the directions"