Archive

Posts Tagged ‘NXT-G’

NXT-G to RobotC

August 21, 2010 2 comments

Can RobotC do everything NXT-G can?

I’ve decided to put RobotC to the test by “translating” every program you can find in NXT-G to RobotC.

I’ve built, programmed and tested every robot using the two programming languages. You can download the RobotC programs here (.7z) or here (.zip).

I think this could help new RobotC users since it shows them how to put a simple code together. That is why I used several different programming techniques while translating. (use of synchronising motors, switches etc.)

I have put several comments to help newbies understand how the program works.

While doing this, I had encountered several problems that might be of interest to RobotC developers:

– nMotorEncoderTarget isn’t very precise while running at hight speed (other methods such as the while(nMotorEncoder < Target) cause the same issues).

– When you stop a motor, it takes a lot of time to stop while running at hight speed.

– The timers aren’t very precise (try and test the RobogatorJaw.c program with both powers at 75).

All this shows us many things, such as:

-RobotC can indeed do what NXT-G can.

-RobotC is less precise than NXT-G but RobotC developers are still working on RobotC for constant improvement.

If you want more NXT software comparisions, you might want to see this.