| aMo_Go | Index |
Definition:
Parameters:
Return Value:
Description:
This routine sets the speeds of two modified servos for a simple 2-wheel differential drive robot. A speed of -60 will make a motor go in reverse at full-speed. A speed of 0 will make a motor stop. A speed of 60 will make a motor go forward at full-speed.
Example:
#include <aMyRobot.tea>
#include <aMo.tea>
void main()
{
aMo_Init();
aMo_Go(60, -60);
}
This would make a 2-wheel drive robot spin clockwise. The left motor will be rotating in the forward direction and the right motor will be rotating in the reverse direction. The "aMyRobot.tea" file is a copy of the "aMo_Def.tea" file which contains specific servo parameters for the robot.
Related: