| aMo_Scoot | Index |
Definition:
Parameters:
| spdl | - | The speed for the left motor. |
| spdr | - | The speed for the right motor. |
| time | - | The amount of time to run the motors before stopping them. |
Return Value:
Description:
This routine sets the speeds of two modified servos for a simple 2-wheel differential drive robot. After an amount of time given in 0.1ms increments, it stops the wheels.
Example:
#include <aMyRobot.tea>
#include <aMo.tea>
void main()
{
aMo_Init();
aMo_Scoot(60, -60, 10000);
}
This would make a 2-wheel drive robot spin clockwise for one second. 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: