How Can We Help?

mBot2 Chassis

1. [DIRECTION] at [POWER]RPM for [TIME] secs

Makes mBot2 move forward, move backward, turn left, or turn right at the specified speed for the specified period

How to use

Click to select a motion option from the drop-down list box and set the speed and time.

Example

After you press the space key, mBot2 moves forward for two seconds.

2. [DIRECTION] at [POWER] RPM

Makes mBot2 move forward, move backward, turn left, or turn right at the specified speed

How to use

Click to select a motion option from the drop-down list box and set the speed.

Example

After you press the space key, mBot2 keeps moving forward.

3. [DIRECTION]  [POWER] [fieldMenu_3] until done

Makes mBot2 move forward or backward the specified distance

How to use

Click to select a motion option from the drop-down list box and set the distance.

The subsequent block(s) is not executed until the execution of this block is complete.

Example

After you press the space key, mBot2 moves forward 20 cm and then the screen of CyberPi displays “Arrived!”

4. [fieldMenu_1] [ANGLE]° until done

Makes mBot2 turn left or right the specified degrees

How to use

Click to select a direction from the drop-down list box and set the number of degrees.

The subsequent block(s) is not executed until the execution of this block is complete.

Example

Use the arrow keys and space key to control the motion of mBot2.

5. encoder motor [fieldMenu_1] [image_2] rotates at [LEFT_POWER][fieldMenu_4] for [number_3] secs

Makes the specified wheel of mBot2 rotate at the specified speed or power for the specified time

How to use

Setting range of the power: –100 to +100; A positive value indicates that the output shaft of the encoder motor rotates counterclockwise; and a negative one indicates that the output shaft of the encoder motor rotates clockwise.

Setting range of the speed: –200 to +200; A positive value indicates that the output shaft of the encoder motor rotates counterclockwise; and a negative one indicates that the output shaft of the encoder motor rotates clockwise.

Click to select a wheel from the drop-down list box, specify the power or speed, and set the time.

Example

When you press the right arrow key, the left wheel of mBot2 rotates to the right for 0.5 seconds.

6. encoder motor [inputMenu_1] [image_2] rotates at [LEFT_POWER][fieldMenu_4]

Makes the specified wheel of mBot2 rotate at the specified speed or power

How to use

Setting range of the power: –100 to +100; A positive value indicates that the output shaft of the encoder motor rotates counterclockwise; and a negative one indicates that the output shaft of the encoder motor rotates clockwise.

Setting range of the speed: –200 to +200; A positive value indicates that the output shaft of the encoder motor rotates counterclockwise; and a negative one indicates that the output shaft of the encoder motor rotates clockwise.

Click to select a wheel from the drop-down list box and set the power or speed.

Example

When you press the right arrow key, the left wheel of mBot2 keeps rotating to the right.

7. encoder motor [fieldMenu_1] [image_1] rotates by [LEFT_POWER] °

Makes the specified encoder motor of mBot2 rotate the specified degrees

How to use

Click to select a motor from the drop-down list box and set the number of degrees.

When you set the number of degrees to a positive value, the output shaft of the encoder motor rotates counterclockwise; and when you set it to a negative value, the output shaft of the encoder motor rotates clockwise.

Example

When you press the right arrow key, the left wheel of mBot2 turns right.

8. encoder motor EM1 [image_1] rotates at [LEFT_POWER]RPM, encoder motor EM2 [image_3] rotates at [number_2]RPM

Makes the two encoder motors of mBot2 rotate at the specified speed

How to use

Click to set the speed of each encoder motor.

Setting range of the speed: –200 to +200 (RPM)

When you set the speed to a positive value, the output shaft of the encoder motor rotates counterclockwise; and when you set it to a negative one, the output shaft of the encoder motor rotates clockwise.

Example

When you press the right arrow key, mBot2 moves forward.

9. encoder motor EM1 [image_1] rotates at [LEFT_POWER] % power, encoder motor EM2 [image_3] rotates at [number_2] % power

Makes the two encoder motors of mBot2 rotate at the specified power

How to use

Click to set the power of each encoder motor.

Setting range of the power: –100 to +100 (%)

When you set the power to a positive value, the output shaft of the encoder motor rotates counterclockwise; and when you set it to a negative one, the output shaft of the encoder motor rotates clockwise.

Example

When you press the right arrow key, mBot2 turns right at the specified power.

10. stop encoder motor[fieldMenu_1]

Stops the specified encoder motor(s) of mBot2

How to use

Click to select an encoder motor or both the encoder motors.

Example

When you press the right arrow key, mBot2 turns right at the specified power.

When you press the s key, mBot2 stops moving.

11. encoder motor [inputMenu_1]  [fieldMenu_2] autolock

Enables or disables the autolock function of the specified encoder motor(s)

How to use

After you enable the autolock function for an encoder motor, the encoder motor attempts to remain in the original position after mBot2 stops moving.

The autolock function is disabled by default.

Click to select an encoder motor or both the encoder motors from the drop-down list box.

Example

When you press the up arrow key, mBot2 moves forward; and when you press the s key, mBot2 stops moving.

12. encoder motor[inputMenu_2]’s [image_2][fieldMenu_3]

Reports the speed or power of the specified encoder motor

How to use

Click to select an motor and the speed or power.

Value range of the rotational speed: –200 to +200 (RPM)

Value range of the power: –100 to +100 (%)

You can select the check box on the left of this block to view the speed or power of the motor on the stage.

Note: This is a reporter block that must be used in combination with another block requiring data.

Example

When you press the up arrow key, mBot2 moves forward; and when you press the d key, the display on CyberPi displays the rotational speed of the left encoder motor.

13. encoder motor[inputMenu_1] [image_2] rotated angle (°)

Reports the number of degrees the specified encoder motor rotates

How to use

mBot2 resets the number of degrees its encoder motors have rotated when being powered on.

The number of degrees increases when the encoder motor rotates counterclockwise; and it decreases when the encoder motor rotates clockwise.

Click to select an encoder motor from the drop-down list box.

Example

After you press the d key, the display on CyberPi displays the number of degrees the left encoder motor rotates in real time. When you press the right arrow key, the number increases; and when you press the left arrow key, the number decreases.

14. reset encoder motor [inputMenu_1][image_2] rotated angle

Resets the number of degrees the specified encoder motor(s) rotates

How to use

Click to select an encoder motor or encoder motors from the drop-down list box.

Example

After you press the d key, the display on CyberPi displays the number of degrees the left encoder motor rotates in real time. When you press the right arrow key, the number increases; when you press the left arrow key, the number decreases; and when you press the r key, the number is reset to zero.