| aMotion_SetVelocity | Index |
Definition:
Parameters:
Return Value:
Description:
This is a convenience function for robots that use two-wheel differential drive. A single call can be used to set the velocity of both motors. This function should only be used when both motors are configured for a velocity control mode.
Example:
#include <aMotion.tea>
aMotion_SetVelocity(40,40);
This would set the velocity of both motors to 40. The robot would go straight.
#include <aMotion.tea>
aMotion_SetVelocity(40,-40);
This would set the velocity of one motor to 40 and the other to -40. This will make a two-wheel drive robot spin.
Related: