LEGO motors have embedded brakes and they can be used to halt the movement of a motor, resist the turning of a motor or to actively restore the position, at which the motor was at when the brakes were activated.

To access the full video please subscribe to FLLCasts.com
- #1533
- 15 Feb 2020
Stopping the motors with no brakes
Motor(Port.D).stop()
This command stops the movement of the motors without actively resisting any further rotations caused by external forces.
Stopping the motors with brakes
Motor(Port.D).brake()
This command stops the motors and actively resists further rotations caused by external forces.
Stopping the motors and maintaining their position
Motor(Port.D).hold()
This activates the strongest brakes in the motors. With it, the motors are stopped and a movement in the opposite direction is activated at any attempt of turning the motor further. This way the motor maintains the angle at which it has stopped.
Caution: The brakes will disengage when the program ends.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Python with LEGO Mindstorms EV3 - Level 1
The course introduces students to the programming language Python. We use LEGO Mindstorms EV3 Robots. Python is a popular programming language. It could be used for introducing students to programming, for academic studies, for developing machine learning algorithms and as a general-purpose language.
During the course, students learn how to read and how to develop Python programs. They use an Integrated Development Environment called Visual Studio Code. Robots are programmed to perform interesting and funny tasks like "bringing you water". The level ends with competition on a playing field with boxes.
- 74
- 28:18
- 114

Lesson 2 - Robotic arm
Introduction
Last time, we programmed our robot to walk around with a platter and a beverage glass, but it couldn't hand the glass to a client. Today we will program a robotic arm to hand out a glass.
Be careful with what speed you will set your robot to move the glass or you may spill its contents!
- 10
- 5
- 9
- 3d_rotation 1