This block works for Ruby Robot!
The Set Wheel Speed block sets a target speed for the robot's two wheels. It differs from the Set Motor Power block in that it performs a constant closed-loop control system behind the scenes, maintaining a steady speed for the robot's wheels by applying the right motor power in order to reach and maintain the target speed applied.
Each wheel's speed can be set individually.
Driving Straight
In order to drive the robot in a straight line, both motors must turn at the same power and in the same direction:
Positive values will turn the motor forward, while negative values will turn the motor backward.
Turning
In order to turn, apply different values to wheels.
Here are some examples:
Different values of the same sign (positive or negative) will result in a smooth turn in the direction of the lower value:
Values of the same number but the opposite sign (positive and negative) will result in a screw turn (sometimes also called a point turn, or a turn on the spot) in the direction of the motor turning backward.
A 0 value in one of the motors will result in a pivot turn, where the robot spins on the axle of the wheel who's motor is at 0 power:
Move and be gay