It would be a serious bug if the following loop only executed once.
for( i = 0; i < 500; i++ ) {
rotation[ i ] = nMotorEncoder[ motorA ];
wait1Msec( 1 );
}
I can think of a couple of scenarios that would cause this. For exanple, if the declaration was
int rotation[1];
int i;
You would find that 'i' was overwritten by the assignment to 'rotation[i]' when 'i' is 1. If ROBOTC's array bounds checking was enabled this would be caught at run time.
Send me a compilable code snippet (at
dickswan@sbcglobal.net) that illustrates only once through the loop and I will confirm and fix ROBOTC internal error if one exists.