A custom block for tank drive using two M Motors simultaneously. Independent power control for left and right, with motor inversion and reverse support.
- Download
MMotorTank.ev3bfrom the Releases page. - Open EV3-G.
- Go to Tools → Import Block.
- Select
MMotorTank.ev3band import. - The M Motor Tank block appears in the Action palette.
| # | Name | Description |
|---|---|---|
| 1 | Ports | Select the two M Motor ports (e.g. A+D). |
| 2 | Power Left | Left motor power (-100 to 100). Negative values reverse direction. |
| 3 | Power Right | Right motor power (-100 to 100). Negative values 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 backwards. |
| 6 | Brake at End | Applies brake after movement ends. Off = coast to stop. |
| Mode | Description |
|---|---|
| Off | Stops both motors. |
| On | Runs continuously at specified power (unlimited). |
| Seconds | Runs for a specified number of seconds. |
| Degrees | Runs for a specified number of degrees. 360° = 1 rotation. |
| Rotations | Runs for a specified number of rotations. |
- In tank drive, the right motor is typically mounted in reverse. Enable 'Invert Right' in that case.
- 'Reverse Both' is XOR'd with 'Invert Right'. Both on means only the right motor runs forward.
- Seconds / Degrees / Rotations modes wait for completion before proceeding.
LEGO MINDSTORMS EV3 Education Software (v1.4.5 or later)