To move a motor, we set the speed at which we want to move, the amount of time we want it to move and the way we want it to stop. There is a command that allows you to set all these parameters at once.

To access the full video please subscribe to FLLCasts.com
- #1534
- 15 Feb 2020
The command is:
Motor(Port.D).run_time(45, 2000, Stop.HOLD)
This command has 4 input parameters, but we will use just 3 of them, namely:
- Speed - the first parameter in the "run_time()", 45 in the example above;
- Time - the second parameter in the "run_time()" command, 2000 in the example above;;
- Brake - the third parameter in the "run_time()", Stop.HOLD in the example above.
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