Knowledge Base

Set Motor Power Block

output-onlinepngtools__10_.png This block works for Ruby Robot!

A robot needs power for its motors in order to move. The Set Motor Power block powers the robot's two wheel-motors. Each motor can be powered 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.


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:

mceclip0.png smooth_turn_left__20_50.gif


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.

mceclip1.png  right_screw_turn_20.gif


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:

mceclip2.png  pivot_right.gif

Was this article helpful?
0 out of 0 found this helpful


  • Avatar
    Wilson, Crystal A

    Yes, helpful!

    Comment actions Permalink

Please sign in to leave a comment.