how to use motor encoder robotc
nMotorEncoder[ ] is a reserve word in ROBOTC that allow a programmer to access the current value of the mo-. tor encoder. To access the value of the encoder attached to motorB use: nMotorEncoder[motorB] It is good practice to reset encoders to zero before you use them. To reset the value of motorC use the following. code: nMotorEncoder[motorC] = 0; Motor Encoders. Each LEGO Smart Motor includes a built in encoder that can be used. to program the robot to move around in a very precise manner.