FASTBot motor command – Spin Right.
This spin function is same as that of the previous function except the bot spins in opposite direction. The left motor is turned forward and the right motor is turned backward. The robot spins to right with a point between the left and right wheels as the center The speed of both the motors can be adjusted independently and need not be the same.
To get the bot spinning clockwise, start double clicking the Motor Control function of the Function window.
Again double click Spin Right function within the expanded list to configure the bot for this operation.
There are four parameters to be set.
The speed of the left motor (forward)
The speed of the right motor (backward)
Function run time (optional)
Stop the motors once the action in performed (optional)
Now, the press of OK button generates the required C code at the cursor position.
The format of the function without setting Stop Motors option is
SpinRight ( char LeftMotorSpeed, char RightMotorSpeed, int RunTime )
The function format with the Stop Motor enabled condition is
SpinRight_S ( char LeftMotorSpeed, char RightMotorSpeed, int RunTime )
The right motor rotates backward and the left motor rotates forward. So, the robot turns right with a point between the left and right wheels as the center When the speed of both the motors are equal the robot just spins in place about the center.
When the right motor is stopped and only the left motor is turned forward, it resembles Turn Right function. The robot turns right in an arc with the right wheel as the center in the forward direction.
But when the left motor is stopped and only the right motor is turned backward, the robot turns in the backward direction. The robot turns right in an arc with the left wheel as the center in the backward direction.