Just enter the name for your new library, select a license (if any) and enter your name or organisation (only so it can fill in the license text - I never record anything like that), and press "Generate". You'll get a Zip file with your new blank library in it, with all the files named right, the license information in it, a template class, all ready to go. Just fill in the code
Ok, it's a bit cleaner. There's enhancements I'd like to make too, like breaking out the actual template data from the code (it's embedded at the moment - quick'n'dirty ).
Feel free to fork, clone, edit, commit, push, and generate pull requests to your heart's content.
Oh, and I have just split the template data out from the script into template files. Much more elegant I feel - easier to edit and extend the template.
Java isn't bad in itself, but it has enabled morons to write programs.
So did visual basic and does php. 8)
karma +1 for daring to share this opinion.
Best regards
Jantje
It's not an opinion... : ]
PHP is great for quick'n'dirty scripting work, as you can see by my code It's also, like Java, incredibly powerful in the right hands. I wouldn't choose PHP to write a desktop application, and I wouldn't choose Java to write a web application. Come to that I wouldn't choose Java to write anything really, but it's often what you're stuck with when you're working with someone else's code...
add the ability to work both under Arduino and Eclipse without source modifcation
and any other nice to have stuff
But that does need some changes in the files and I am not sure the author likes it that way But of course I am always willing to share. Ia
Hi Jantje
For Eclipse we include the .h file with the references to setup and loop and any functions we use. Which btw is neat programming as far as I am concerned
In the Arduino we can skip all this.
And a couple of my customers just want the sketch and that's it. So now I solve it this way:
nicoverduin:
Works like a charm. What I want to do is:
add a bunch of doxygen parms I am working with
add a couple of SVN parameters
add the ability to work both under Arduino and Eclipse without source modifcation
and any other nice to have stuff
But that does need some changes in the files and I am not sure the author likes it that way But of course I am always willing to share. Ia
It's under the BSD license - you can copy / modify / redistribute at will as long as you keep it under the same license
If you do come up with some nice generic mods that would be useful for others, then it would be great if you could share them back to the original repo.
The way it's normally done is you fork the repo (press the "fork" button in the top right) then you have a copy of it on GitHub. Then you clone your repo to your local computer, and do all your work in there. Then you can check it in and push to your own repo as much as you like.
When you're happy with it you create a pull request (green button) which then generates a patch which I can apply to my repo automatically.
nicoverduin:
Hi Jantje
For Eclipse we include the .h file with the references to setup and loop and any functions we use. Which btw is neat programming as far as I am concerned
In the Arduino we can skip all this.
And a couple of my customers just want the sketch and that's it. So now I solve it this way:
#ifdef __IN_ECLIPSE__
#include "test.h" #endif
Then it always works
I'm a bit confused here. IMHO Arduino does not do "pre processing" of the library files. So for libraries you are down to C/C++ including the need of function definitions before function usage.
For sketches the only file arduino includes behind your back is arduino.h. All the libraries need a include in the ino file. If not Arduino can not calculate the build and include path.
So IMHO
#ifdef __IN_ECLIPSE__
#include "test.h"
#endif
can always be replaced with
#include "test.h"
when test.h has the double include protection like
#ifndef _[HEADERNAME]_H_
#define _[HEADERNAME]_H_
//Your code goes here
#endif
If I'm wrong please tell me.
Note that I created the IN_ECLIPSE define and I never used it. I'm not even sure V2 of the plugin still defines it.
So if there is a need I would like to know so I can make sure it stays in (or gets back into) the plugin.
Best regards
Jantje
Hi Jantje
I have customers who simply just don't want the extra include file when they compile the code. They just want the single .ino.
So if I simply put the include in, Arduino will start complaining. Doing it this way the preprocessor knows it works within either Eclipse or not.
So please leave it in