View unanswered posts | View active topics It is currently Fri Sep 19, 2014 10:44 pm






Reply to topic  [ 7 posts ] 
RobotC and the standard Lego GUI 
Author Message
Rookie

Joined: Tue Dec 08, 2009 10:52 am
Posts: 4
Post RobotC and the standard Lego GUI
Hi all,

Brand new to this, in fact, I have not even unwrapped the NXT 2.0 kit yet as it's got to wait for Christmas!

I do have a quick question though that I'm hoping someone will be able to answer...

If I install the RobotC firmware on the brick, will my kids still be able to program the robot using the standard lego GUI, or does that require a reflash of the original firmware?


Tue Dec 08, 2009 1:48 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: ROBOTC and the standard Lego GUI
You'll need to reflash but that is super easy and quick. It would take all of about 20 seconds, I think :)

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 Dec 08, 2009 4:35 pm
Profile WWW
Rookie

Joined: Tue Dec 08, 2009 10:52 am
Posts: 4
Post Re: ROBOTC and the standard Lego GUI
Excellent and thanks for the quick reply!

I'm an old C tart at heart, and don't think I'll get the hang off the GUI looks very messy to me - hell, I'm probably more comfortable with assembler, but it's been soooo long since I coded anything, I'll be pleased with a 'Hello World'!


Tue Dec 08, 2009 5:07 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: ROBOTC and the standard Lego GUI
Let me help you with that

Code:
task main () {
  nxtDisplayCenteredBigTextLine(2, "Hello");
  nxtDisplayCenteredBigTextLine(4, "World!");
  wait1Msec(5000);
}


Tadaaah :)

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 Dec 08, 2009 5:28 pm
Profile WWW
Rookie

Joined: Tue Dec 08, 2009 10:52 am
Posts: 4
Post Re: ROBOTC and the standard Lego GUI
:D

Thank you kindly sir!

I'm just going to read through the code documentation now, but to jump right to the point, and get another question under my belt, what kind of memory management can you do in RobotC - Are arrays fixed size as declared in the code, or is there an equivalent of malloc or similar to create a run time, or is it more sophisticated than that nowadays?

My first 'project' is to get a robot to map the contents of an area with a view to building a compact map of obstacles in its memory so it knows to avoid them - obviously, I don't know how big the space is or how many objects will exist at compile time, so looking for some form of dynamic memory management.


Tue Dec 08, 2009 5:37 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: ROBOTC and the standard Lego GUI
Furtim,

There is no memory management. All arrays must be static. There are also no pointers, which can be a blessing -and- a curse :) There is a good tutorial here: http://www.robotc.net/blog/?p=108

As for variable space, I believe it's around 20-24K or so, so that's a pretty big map :)

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 Dec 08, 2009 6:02 pm
Profile WWW
Rookie

Joined: Tue Dec 08, 2009 10:52 am
Posts: 4
Post Re: ROBOTC and the standard Lego GUI
Xander,

Thanks for the link - excellent tutorial.

Furtim.


Tue Dec 08, 2009 6:23 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.