ROBOTC for MINDSTORMS - Movement Functions  

ROBOTC Natural Language - NXT: (PDF) 

Movement Functions:
Title Picture Description Default Usage and Sample Usage and Sample with Parameters

Start Motor Start Motor Set a motor to a speed.

Range: -100 to 100

Acceptable Motors: ports A through C,
(and your names for them given in Motors and Sensors Setup.)

startMotor(motor, speed)
default motor: motorA
default speed: 75

startMotor();
wait();
stopMotor();


startMotor(motor, speed)
To set motorB to speed -25 for 0.5 seconds:


startMotor(motorB, -25);
wait(0.5);
stopMotor(motorB);



Stop Motor
Stop Motor Stops a motor.

Acceptable Motors: ports A through C,
(and your names for them given in Motors and Sensors Setup.)

stopMotor(motor)
default motor: motorA

startMotor();
wait();
stopMotor();


stopMotor(motor)
To stop a motor in motorB:

startMotor(motorB, -25);
wait(0.5);
stopMotor(motorB);



(print me in landscape mode)

 

 


Copyright © 2012 Robotics Academy/Robomatter - http://robotc.net/