pxt-ev3/docs/reference/motors/stop-all.md
Galen Nickel 67153fccc5
Reduce the use of @boardname@ (#527)
* Reduce the use of @boardname@

* Use literal 'EV3 Brick' string instead

* Use the new 'nickname' form
2018-04-16 16:15:58 -07:00

599 B

stop All Motors

Stops all motors currently running on the brick.

motors.stopAll();

The motors stops but any motion caused from previously running the motors continues until it runs down. If you are driving your brick and then stop the motors, it will coast for awhile before stopping.

Example

Tank the EV3 Brick forward at half speed for 5 seconds and then stop.

motors.largeAB.tank(50, 50);
pause(5000);
motors.stopAll();

See also

stop, reset, set brake