Mode to create libraries?

I was starting on my first library last night, and I quickly found that the IDE won't allow you to use your own extensions (ie, .cpp and .h for a library) - an integrated way to create a library would be really nice, along with boilerplate templates for the header and source files, and a way to "one-click" package everything (maybe include a means to edit/create the keywords.txt file, too).

Right now, I created my library as two separate tabs (called source and header), then once done, I used gedit (in Ubuntu) to bring up the parts, rename them, stuff them into a directory, etc - there wasn't any problem doing this for my skills, but an integrated method in the IDE would've been nicer...

I just want everything, don't I? Maybe I need to move to eclipse...

:slight_smile:

You should be able to add .cpp and .h files to a sketch (as long as you also have a .pde file). But you're right, there it could definitely be easier to make and package libraries.

Hmm - well in the project I was trying I didn't have an initial .pde file, I just started coding up the library; tonight when I get home and work on the project again (I am fighting issues with incorporating the SoftwareSerial library usage into the library - but I think I found an example of how to do it properly here in the forums), I will give that a shot; I need a regular sketch anyhow in the package to act as an example of usage anyhow. Thanks for the tip.

:slight_smile:

I wrote and use libraries extensively. My current project has nine that I wrote. When I write them I almost always start with a simple .pde sketch to debug and test them.

The system isnt very good at the startup of a library, no. Keywords dont update without restarting and so on.
BUT when the keywords run, its fairly easy to edit the .h and the .cpp when running the sketch to kill bugs.
Personnaly I use Notepad++ as my texteditor, so its just a alt-tab away.
I also miss a better possibility to document the functions I create in the library, but most Arduino coders seems to disagree.
A nice function in the sketch would be a intellisense, when using functions. Even if its mr Mean:s "invention". :wink: