Better then drag-and-drop?
Page 1 of 1

Author:  MasterMind813 [ Thu Feb 22, 2007 1:03 pm ]
Post subject:  Better then drag-and-drop?

I'm new here,
why is RobotC better than the drag-and-drop software that you get on the cd?

Author:  MasterMind813 [ Sat Feb 24, 2007 5:47 am ]
Post subject: 

Can you do more advanced stuff with RobotC than with the drag-and-drop software?

Author:  vnguyen [ Sat Feb 24, 2007 9:18 am ]
Post subject: 

MasterMind813 wrote:
Can you do more advanced stuff with RobotC than with the drag-and-drop software?

Just to give you some ideas on what ROBOTC can do:

1) Take advantage of the NXT's closed-loop feedback system in order to perform algorithms such as PID in order to ensure accurate motor power. (ex. if you set 50% power on a normal "move forward" program, due to friction the motors it won't go exactly 50%, it may be lower. So PID calculates what power level it should be, and adjusts the power level to do so). Great for moving in a straight line as well as other behaviors.

2) Motor Syncing. Along with PID, you can have a "slave" motor go "exactly" the speed of the "master" motor. Great for point turns, moving straight, etc.

3) Math functions such as sin, cos, acos, asin, tan, atan, sqrt... used for trig calculations as seen in: ... gdemo.html

As far as the actual application:

1) Allow for more programs to be loaded onto the NXT because of the much smaller size of the ROBOTC programs.

2) Faster/better response when it comes to line tracking because of the optimized algorithms used to process the sensor port values.

3) ROBOTC Interface doesn't require nearly as much processing power.

There are many more ways that ROBOTC is unique. Since it is syntax-based, it's much easier to read code especially for the programmer who's used to seeing just code or even the learner who doesn't want 8 pages of icon-code.

Author:  MasterMind813 [ Sat Feb 24, 2007 4:31 pm ]
Post subject: 

Wow! That sounds great!

About how much smaller memory space takes these programs compared to the usual drag-and-drop-programs?

Author:  Dick Swan [ Mon Feb 26, 2007 5:18 am ]
Post subject: 

Some users will be quite content with the graphical "drag and drop" software that is available in the retail NXT kit. Other users will want a text based programming solution. It will be an individual choice.
RobotC has a terrific feature set for those interested in the text based programming language. In addition to the points in the previous post, here's a few others:
  • Best sound support for the NXT. It is the only solution that allows you to queue sound items -- with drag-and-drop you can only have one sound item active at a time. It's the only solution to support compressed sound files.
  • Enhanced capabilities for drawing on the NXT LCD. Many more functions to provide precies positioning of text and graphics. For example, drag-n-drop only allows you to draw the outline of a rectangle. Roibotc lets you draw the outline, or fill the rectangle, or erase the rectangle. RobotC also has both the standard and double size font that can be drawn to the screen. The LCD display functions have been rewritten to run 5X faster than drag-n-drop so that there is minimal screen flicker as you repetitively draw over existing text.
  • Better and more precise control over motors. The firmware for controlling motors is rewritten to provide a better and more accurate performance.
  • Support for floating point and trigonmetry functions. Very important if you want to write some "dead reckoning" code to keep track of your robot's travels.
  • A terrific interactive debugging capability on the PC. You can step through your program execution one line at a time. All program variables are available in a PC window display. You can suspend your program in the middle of execution, look at your program variables to see if they're what's expected, and then resume execution. You can define breakpoints which mean "whenever my program tries to execute this line of code, please automatically suspend the execution so that I can examine execution progress and then I will resume execution from this point." Incredibly powerful features.
  • The best support for third party sensors from Hitechnic and Mindsensors.
  • A great text editor with auto formating of your code, colored syntax of your code -- i.e. different colors for different types of keywords and variables, etc
  • Incredibly fast execution. 10 to 80 times faster than the drag-n-drop firmware.
    And many more items.

Author:  JamesD [ Tue Feb 27, 2007 7:18 am ]
Post subject:  Viewing variable values

From Dick's post above.
All program variables are available in a PC window display

Hi Dick or anyone else who can help.

How do open or view the window to display variable values? Is this new in 1.02?


Author:  tfriez [ Tue Feb 27, 2007 10:13 pm ]
Post subject: 

Seeing the debugger variables has been around for a while with the NXT.

You can see these variables after you load a program and the debug system is running.

If the window for variables does not appear, you can open it manually from the Robot - Debugger Windows - Global Variables menu selection.

I'll post a screenshot tomorrow morning.

Author:  JamesD [ Wed Feb 28, 2007 5:22 pm ]
Post subject:  Displaying variable values

Hi Tim,

Thanks for that. I'd been wondering how to do that. I was used to Visual Studio where the variables were pushed into one of the window sections/panes automatically when debugging.

Anyway, you have saved me a lot of hassle displaying variables on the NXT's LCD display. :D

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group