View unanswered posts | View active topics It is currently Thu Nov 27, 2014 5:28 am






Reply to topic  [ 6 posts ] 
Writing own libraries for RobotC 
Author Message
Rookie
User avatar

Joined: Sat May 12, 2012 7:07 am
Posts: 18
Location: Bangalore
Post Writing own libraries for RobotC
Hello,
Are we allowed to write custom libraries for RobotC?
If yes, then where are we supposed to dump it, I mean the .c and .h files.
Any words of wisdom?
-
Aravind

_________________
Visit us: http://www.li2.in


Tue May 29, 2012 6:51 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3293
Location: Rotterdam, The Netherlands
Post Re: Writing own libraries for RobotC
I've been writing drivers for ROBOTC for a while now and I publish them on my own site (see my signature). My word of wisdom would be to put everything in the header file and not use .c files at all. ROBOTC does not have a linker, so you'd end up with something like #include "somefile.c" and that just looks nasty.
Also, use Doxygen to create auto-documenting code. Take a look at my library to see how I've been doing it.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue May 29, 2012 6:59 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Thu Dec 22, 2011 7:42 am
Posts: 43
Post Re: Writing own libraries for RobotC
In my project (see my signature) I split code into many .c and .h that all follow strict rules to be compatible with RobotC environment.
Have a look on it and ask questions if necessary ;-)

Regards
Miki

_________________
Visit my project RainBot v0.11 on source forge, a 6 wheels robot featuring A* & Dijkstra's path finding, motors & sensors emulation, small font, fifo & sorted list libraries, using Xander's drivers for HT Compass, and documented with doxygen.


Tue May 29, 2012 12:51 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Writing own libraries for RobotC
Li2 Innovations wrote:
Hello,
Are we allowed to write custom libraries for RobotC?
If yes, then where are we supposed to dump it, I mean the .c and .h files.
Any words of wisdom?
-
Aravind

When you said "allowed", what context are you referring to? Are you talking about FTC? If you are just doing robot programming on your own, of course you are allowed to do anything to your code. If for FTC, I believe as long as it is publicly available to other teams, it is allowed. We did our own library and it is available here. http://proj.titanrobotics.net/hg/Ftc/2012/code/file/e28dbb95c68b/ftclib
Just like what Xander said, our library is implemented as .h files. Although RobotC doesn't really support object-oriented programming, our library code is organized as objects using C-structures.


Tue May 29, 2012 4:53 pm
Profile
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Re: Writing own libraries for RobotC
MHTS wrote:
We did our own library and it is available here. http://proj.titanrobotics.net/hg/Ftc/2012/code/file/e28dbb95c68b/ftclib
Just like what Xander said, our library is implemented as .h files. Although RobotC doesn't really support object-oriented programming, our library code is organized as objects using C-structures.


Wow, nice job.

_________________
Mike aka Spiked3
http://www.spiked3.com


Tue May 29, 2012 6:04 pm
Profile
Rookie
User avatar

Joined: Sat May 12, 2012 7:07 am
Posts: 18
Location: Bangalore
Post Re: Writing own libraries for RobotC
Hello,
Thank you Xander, Miki and MHTS. I will look through your sample library files.
@ MHTS: By mentioning "allowed" I meant whether we need an official permission to include such custom libraries into the software. Well anyways I got your point.
Thanks again
-
Aravind

_________________
Visit us: http://www.li2.in


Wed May 30, 2012 3:07 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.