Pages: [1] 2   Go Down
Author Topic: Library generator  (Read 2190 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Bored with writing the same code time and again when you start a new library?  Me too.

That's why I wrote myself a little Automatic Library Generator: http://www.uecide.org/blanklib.php

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 smiley
« Last Edit: November 22, 2013, 02:33:46 pm by majenko » Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Saskatchewan
Offline Offline
Sr. Member
****
Karma: 19
Posts: 364
When the going gets weird, the weird turn pro. - Hunter S. Thompson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome. Works as promised. Thanks.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 130
Posts: 8621
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Just fill in the code
Can't you do that part as well, I'm also bored with that smiley

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks,  smiley-cool smiley-cool smiley-cool
Logged

Heemskerk, Netherlands
Offline Offline
Sr. Member
****
Karma: 10
Posts: 406
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Care to share the PHP code? I would like to extend it a little bit smiley (like doxygen code etc) smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice I would love to make my own too.
I am working on stepper motor
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I could do, but it's a little messy smiley-wink

I know... I'll clean it up and github it - that way anyone could contribute.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Heemskerk, Netherlands
Offline Offline
Sr. Member
****
Karma: 10
Posts: 406
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great!! thanks
Nico
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink ).

https://github.com/majenkotech/ArduinoLibraryGenerator

Feel free to fork, clone, edit, commit, push, and generate pull requests to your heart's content.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1926
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Java isn't bad in itself, but it has enabled morons to write programs.
So did visual basic and does php.  smiley-cool
karma +1 for daring to share this opinion.
Best regards
Jantje
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Java isn't bad in itself, but it has enabled morons to write programs.
So did visual basic and does php.  smiley-cool
karma +1 for daring to share this opinion.
Best regards
Jantje
It's not an opinion... : smiley-twist

PHP is great for quick'n'dirty scripting work, as you can see by my code smiley-wink 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...

And let's not even mention Visual Basic...
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Heemskerk, Netherlands
Offline Offline
Sr. Member
****
Karma: 10
Posts: 406
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
But that does need some changes in the files and I am not sure the author likes it that way smiley-mr-green But of course I am always willing to share. Ia
Logged

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1926
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

...
- add the ability to work both under Arduino and Eclipse without source modifcation
What is needed for this?
Best regards
Jantje
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Heemskerk, Netherlands
Offline Offline
Sr. Member
****
Karma: 10
Posts: 406
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
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:
Code:

#ifdef __IN_ECLIPSE__
#include "test.h"
#endif

Then it always works
Logged

Pages: [1] 2   Go Up
Jump to: