How to use libraries

Hi, I recently discovered Spark Core and altho i don’t have the hardware yet i’ve been looking around to see how the programming works exactly. Web interface looks good but so far i don’t understand how can i use libraries.
I have some previous arduino experience - in there libraries are in separate folder and if i want to use a library in my code i call it out like so: #include <Wire.h>

Best and logical way in here would simply to write the same line and it would use that library (there would have to be library by that name in Sparks online repository of course) - but that is how i would imagine it would work.

What is the actual way to find and use a library?

On the upper side of the web IDE, you’ve got a possibility to press on a little + sign in order to add a new file. This file is then automatically included by #include. You could then paste your desired code in there.

Libraries may, or may not be, automatically compatible with the Spark and may require some adjustments to be made. You could browse through the libraries category on this forum to see wich libraries are being worked on. There are lots of capable and nice people on here that are willing to help you create/edit a library if you were to ask for it nicely.

Good luck

1 Like

@Moors7 is right on all points, and there is a new feature in development for easily finding and sharing libraries within the IDE; expect that within the next couple of weeks.