Two Motors - Steer & Tank

Move Steering Block

The Move Steering block can make your robot drive forward, backward, turn, or stop. You can adjust the steering to make your robot go straight, drive in arcs, or make tight turns.

Use the Move Steering block for robot vehicles that have two Large Motors, with one motor driving the left side of the vehicle and the other the right side. The Move Steering block will control both motors at the same time, to drive your vehicle in the direction that you choose.

 

 Left motor 
 Right motor

Tips and Tricks
Robot vehicles with two drive motors can also be controlled by the Move Tank block. The Move Tank block is similar to the Move Steering block, but has a different way of controlling turns.
CHOOSE YOUR MOTOR PORTS AND CONTROL MODE


 Port Selector 
 Mode Selector 
 Inputs

Select the two motors (A, B, C, or D) that you want the Move Steering block to control by using the Port Selector on the top of the block. Click on each motor letter to choose the port for that motor. The first port should be the motor on the left side of the vehicle, and the second port should be the motor on the right side.

Tips and Tricks
Make sure that with your robot facing “forward”, the motor on the left side is the first one listed in the Port Selector. Otherwise, your robot will turn in the wrong direction.
 
Use the Mode Selector to select how you want to control the motors. After selecting the mode, you can choose values for the inputs. The inputs available will change depending on the mode. The modes and inputs are described below.
MODES
On

The On mode turns both motors on, then immediately continues to the next block in the program. You can control the speed and direction of the motors using the Power and Steering inputs. The motors will run until they are stopped or changed by another block later in the program, or until the program ends.

Example
Use the On mode when you want other blocks in your program to control how long the motors stay on. In this program the robot drives forward. When the touch sensor is pressed the robot stops.
Off

The Off mode turns both motors off. Use the Off mode to stop a robot that was started by the On mode earlier in the program. See the example above.

  1. Brake at End is True, the motors are stopped immediately. The motors will be held in their stopped position until another Move or Motor block starts them, or until the program ends. If Brake at End is False, power to the motors is simply turned off. The motors will coast using any remaining momentum until they stop, or until another Move or Motor block starts.
On For Seconds

On for Seconds turns both motors on for the number of seconds in the Seconds input, then turns them off. The block will wait until the time has passed before the program will continue to the next block. 

You can control the speed and direction of your robot using the Power and Steering inputs. Use Brake at End to stop your robot after exactly the specified number of seconds.

Example
This program will make a robot drive straight forward at full power for 2 seconds, then stop.
Tips and Tricks
You can use a decimal point in the Seconds input to get an exact amount of time, such as 3.5 for three and a half seconds, and 0.25 seconds for one quarter of a second.
On For Degrees

On for Degrees turns both motors on, waits until one of them has turned for the number of degrees of rotation in the Degrees input, and then turns both motors off. This can be used to make your robot travel a specific distance or turn a specific amount. 360 degrees of rotation corresponds to one full turn of a motor.

You can control the speed and direction of your robot using the Power and Steering inputs. Use Brake at End to stop your robot after exactly the specified number of degrees.

Example 1
The program below will make a robot drive straight forward at 75% power until the motors have turned 900 degrees (two and a half rotations), then stop.
Tips and Tricks
The distance that your robot will travel depends on the Degrees input. However, the distance also depends on the diameter of the drive wheels used and other physical factors. The internal rotation sensors in the motors measure the amount of rotation at the motor hubs.
 
If the Steering input is not zero, one of the motors will be slowed down or reversed to make the robot turn. In this case, the Degrees input will be measured on the motor that is turning faster.
Example 2
This program will make a robot turn in an arc to the right, using a Steering value of 25 and 50% power. The turn will continue until the left motor (the outside and faster one) has turned exactly 1000 degrees, then the robot will stop.
Tips and Tricks
Note that the Degrees input measures the amount of motor rotation of the faster motor, not the change in the robot’s direction when turning. The change in the robot’s direction will depend on wheel diameter, wheel spacing, and other factors.
On For Rotations

On for Rotations turns both motors on, waits until one of them has turned for the number of rotations in the Rotations input, then turns both motors off. This can be used to make your robot travel a specific distance or turn a specific amount.

You can control the speed and direction of your robot using the Power and Steering inputs. Use Brake at End to stop your robot after exactly the specified number of motor rotations.

Tips and Tricks
If the Steering input is not zero, one of the motors will be slowed down or reversed to make the robot turn. In this case, the Rotations input will be measured on the motor that is turning faster.
Example
This program will make a robot drive straight forward at 50% power until the motors have turned 3 full rotations. It will then drive straight backwards (using a negative number for Power) for 3 rotations and stop where it started.
Tips and Tricks
The On for Rotations mode is exactly the same as the On for Degrees mode, but it uses a different unit of rotation. You can also use a decimal point in the Rotations input to get parts of a rotation. The following examples show two different ways to get the same amount of rotation:
RotationsDegrees
1 360
2 720
0.5 180
1.25 450
7.2 2592
MOTOR POWER AND DIRECTION
The Power input accepts a number from -100 to 100. Positive and negative numbers for Power make the Large Motor turn in different directions, as shown in the graphic below.



 Positive Power
 Negative Power

You can change the normal rotation direction for a motor using the Invert Motor block. If a motor direction has been inverted, the effect of positive and negative power levels will be the opposite of that shown above.

Tips and Tricks
The rotation speed of a motor will be roughly proportional to the power level specified, although rotation speed is also affected by how much load is put on the motor.
STEERING AND MOTOR SPEED
The Steering input accepts a number from -100 to 100. A value of 0 (zero) will make your robot drive straight. A positive number (greater than zero) will make your robot turn to the right, and a negative number will make your robot turn to the left. The farther the steering value is from zero, the tighter the turn will be. 

The Move Steering block makes your robot turn by running the two motors at different speeds. For very tight turns, one of the motors will be reversed.

Tips and Tricks
To directly control the power level used by both motors, you can use the Move Tank block instead of the Move Steering block.
INPUTS
The inputs of the Move Steering block control the details of how the motors will operate. You can enter the input values directly into the block. Alternatively, the values can be supplied by Data Wires from the outputs of other Programming Blocks. The inputs available and their functions depend on the control mode you selected.
InputTypeAllowed ValuesNotes
Power Numeric -100 to 100 Motor power level.
  1. Motor Power and Direction.
Steering Numeric -100 to 100 Steering direction.
  1. Steering and Motor Speed.
Brake at End Logic True/False Applies when the block finishes.

If True, the motors are stopped immediately and held in position.

If False, motor power stops and the motors are allowed to coast.

Seconds Numeric ≥ 0 Movement time in seconds.
Degrees Numeric Any Number Amount of movement amount in degrees. 360 degrees make a full rotation.
Rotations Numeric Any Number Amount of movement in rotations.

Move Tank Block

The Move Tank block can make a robot drive forward, backward, turn, or stop. Use the Move Tank block for robot vehicles that have two Large Motors, with one motor driving the left side of the vehicle and the other the right side. You can make the two motors go at different speeds or in different directions to make your robot turn.
 

 Left motor 
 Right motor

Tips and Tricks
Robot vehicles with two drive motors can also be controlled by the Move Steering block. The Move Steering block is similar to the Move Tank block, but has a different way of controlling turns.
CHOOSE YOUR MOTOR PORTS AND CONTROL MODE


 Port Selector 
 Mode Selector 
 Inputs

Select the two motors (A, B, C, or D) that you want the Move Tank block to control by using the Port Selector on the top of the block. Click on each motor letter to choose the port for that motor. The first port should be the motor on the left side of the vehicle, and the second port should be the motor on the right side.

Tips and Tricks
Make sure that with your robot facing “forward”, the motor on the left side is the first one listed in the Port Selector. Otherwise, your robot will turn in the wrong direction.
 
Use the Mode Selector to select how you want to control the motors. After selecting the mode, you can choose values for the inputs. The inputs available will change depending on the mode. The modes and inputs are described below.
MODES
On

The On mode turns both motors on, then immediately continues to the next block in the program. You can control the speed and direction of the motors using the Power Left and Power Right inputs. The motors will run until they are stopped or changed by another block later in the program, or until the program ends.

Example
Use the On mode when you want other blocks in your program to control how long the motors stay on. In this program the robot drives straight forward. When the touch sensor is pressed the robot stops.
Off

The Off mode turns both motors off. Use the Off mode to stop a robot that was started by the On mode earlier in the program. See the example above.

  1. Brake at End is True, the motors are stopped immediately. The motors will be held in their stopped position until another Move or Motor block starts them, or until the program ends. If Brake at End is False, power to the motors is simply turned off. The motors will coast using any remaining momentum until they stop, or until another Move or Motor block starts.
On For Seconds

On for Seconds turns both motors on for the number of seconds in the Seconds input, then turns them off. The block will wait until the time has passed before the program will continue to the next block. 

You can control the speed and direction of your robot using the Power Left and Power Right inputs. Use Brake at End to stop your robot after exactly the specified number of seconds.

Example
This program will make a robot drive straight forward at full power for 2 seconds, then stop.
Tips and Tricks
You can use a decimal point in the Seconds input to get an exact amount of time, such as 3.5 for three and a half seconds, and 0.25 seconds for one quarter of a second.
On For Degrees


On for Degrees turns both motors on, waits until one of them has turned for the number of degrees of rotation in the Degrees input, and then turns both motors off. This can be used to make your robot travel a specific distance or turn a specific amount. 360 degrees of rotation corresponds to one full turn of a motor.

You can control the speed and direction of your robot using the Power Left and Power Right inputs. Use Brake at End to stop your robot after exactly the specified number of seconds.

Example 1
This program will make a robot drive straight forward at 75% power until the motors have turned 900 degrees (two and a half rotations), then stop. Using the same value for Power Left and Power Right makes the robot drive straight.
Tips and Tricks
The distance that your robot will travel depends on the Degrees input. However, the distance also depends on the diameter of the drive wheels used and other physical factors. The internal rotation sensors in the motors measure the amount of rotation at the motor hubs.
Example 2
The program below will make a robot turn in an arc to the right, because Power Left is greater than Power Right. The turn will continue until the left motor (the outside and faster one) has turned exactly 900 degrees, then the robot will stop.

Example 3
This program will make a robot do a “spin turn” by making the two motors turn in different directions. Using a negative number for Power Right makes the right motor turn backwards. The robot will turn until the left motor has turned 250 degrees forward, then the robot will stop. The right motor will turn 250 degrees backwards.
Tips and Tricks
Note that the Degrees input measures the amount of motor rotation of the forward or faster motor, not the change in the robot’s direction when turning. The change in the robot’s direction will depend on wheel diameter, wheel spacing, and other factors.
On For Rotations

On for Rotations turns both motors on, waits until one of them has turned for the number of rotations in the Rotations input, then turns both motors off. This can be used to make your robot travel a specific distance or turn a specific amount.

You can control the speed and direction of your robot using the Power Left and Power Right inputs. Use Brake at End to stop your robot after exactly the specified number of seconds.

Example
This program will make a robot drive straight forward at 50% power (using 50 for both Power Left and Power Right) until the motors have turned 3 full rotations. It will then drive straight backwards (using negative power) for 3 rotations and stop where it started.
Tips and Tricks
The On for Rotations mode is exactly the same as the On for Degrees mode, but it uses a different unit of rotation. You can also use a decimal point in the Rotations input to get parts of a rotation. The following examples show two different ways to get the same amount of rotation:
RotationsDegrees
1 360
2 720
0.5 180
1.25 450
7.2 2592
MOTOR POWER AND DIRECTION
The Power Left and Power Right inputs accept a number from -100 to 100. Positive and negative numbers make the Large Motor turn in different directions, as shown in the graphic below.



 Positive Power
 Negative Power

You can change the normal rotation direction for a motor using the Invert Motor block. If a motor direction has been inverted, the effect of positive and negative power levels will be the opposite of that shown above.

Tips and Tricks
The rotation speed of a motor will be roughly proportional to the power level specified, although rotation speed is also affected by how much load is put on the motor.
INPUTS
The inputs of the Move Tank block control the details of how the motors will operate. You can enter the input values directly into the block. Alternatively, the values can be supplied by Data Wires from the outputs of other Programming Blocks. The inputs available and their functions depend on the control mode you selected.
InputTypeAllowed ValuesNotes
Power Left Numeric -100 to 100 Motor power level for the left motor.
See Motor Power and Direction.
Power Right Numeric -100 to 100 Motor power level for the right motor.
See Motor Power and Direction.
Brake at End Logic True/False Applies when the block finishes.
If True, the motors are stopped immediately and held in position.
If False, motor power stops and the motors are allowed to coast.
Seconds Numeric ≥ 0 Movement time in seconds.
Degrees Numeric Any Number Amount of movement amount in degrees. 360 degrees make a full rotation.
Rotations Numeric Any Number Amount of movement in rotations.