MMotorTank — EV3-G Custom Block
A custom block for LEGO MINDSTORMS EV3 Education software (EV3-G) that controls two M Motors simultaneously for tank drive.
The standard EV3-G software has no block for driving two M Motors as a tank, so this fills that gap.
Get the latest MMotorTank.ev3b from the Releases page.
Download MMotorTank.ev3b from the Releases page.
Open EV3-G.
Go to Tools → Import Block .
Select MMotorTank.ev3b and import.
The M Motor Tank block appears in the Action palette.
Item
Details
Target Software
LEGO MINDSTORMS EV3 Education (EV3-G) v1.4.5+
Modes
Off / On / Seconds / Degrees / Rotations
Port Selection
Two-port UI in the top-right corner (default: A+D)
Power Left/Right
Independent, -100 to 100
Invert Right
Compensates for physically reversed right motor mounting
Reverse Both
Reverses both motors for backward driving
Languages
15 languages
#
Parameter
Description
1
Ports
Select the two M Motor ports (e.g. A+D). Shown in the top-right corner of the block.
2
Power Left
Left motor power, -100 to 100. Negative = reverse direction.
3
Power Right
Right motor power, -100 to 100. Negative = reverse direction.
4
Invert Right
Enable if the right M Motor is physically mounted in reverse (default: on).
5
Reverse Both
Reverses both motors simultaneously. Use for driving backward.
6
Brake at End
Applies brake after movement ends. Off = coast to stop.
Mode
Description
Off
Stops both motors.
On
Runs both motors continuously at the specified power.
Seconds
Runs for a specified number of seconds, then stops.
Degrees
Runs for a specified number of degrees (360° = 1 rotation), then stops.
Rotations
Runs for a specified number of rotations, then stops.
XOR = Invert Right XOR Reverse Both
actual_left = Power Left × (1 − 2 × Reverse Both)
actual_right = Power Right × (1 − 2 × XOR)
Invert Right = on, Reverse Both = off → Right motor runs in reverse (standard tank wiring compensation)
Invert Right = off, Reverse Both = on → Both motors reversed (backward)
Invert Right = on, Reverse Both = on → Only left motor reversed (left turns backward)
Documentation by Language
LEGO MINDSTORMS EV3 Education software (EV3-G) v1.4.5 or later
Windows (EV3-G is Windows/Mac only)
MIT License