Set the rotation speed of the motor as a percentage of maximum speed.
```sig
motors.largeA.setSpeed(50)
```
The speed setting is a pecentage of the motor's full speed. Full speed is the speed that the motor runs when the brick supplies maximum output voltage to the port.
If you use just the **speed** number, the motor runs continously and won't stop unless you tell it to. You can also give a value for a certain amount of distance you want the motor to rotate for. The **value** can be an amount of time, a turn angle in degrees, or a number of full rotations.
If you decide to use a **value** of rotation distance, you need to choose a type of movement **unit**.
## ~hint
If you use a number of milliseconds as movement units, then you don't need to include the unit type.
To run the motor for 500 milliseconds:
```block
motors.largeA.setSpeed(50, 500)
```
## ~
Here is how you use each different movement unit to run the motor for a fixed rotation distance.
* **speed**: a [number](/types/number) that is the percentage of full speed. A negative value runs the motor in the reverse direction.
* **value**: the [number](/types/number) of movement units to rotate for. A value of `0` means run the motor continuously.
* **unit**: the movement unit of rotation. This can be `milliseconds`, `seconds`, `degrees`, or `rotations`. If the number for **value** is `0`, this parameter isn't used.
## ~hint
** Reverse is negative speed**
Turning the motor in the opposite direction (reverse) is simple. Reverse is just a negative speed setting. To drive the motor in reverse at 25% speed:
```block
motors.largeB.setSpeed(-25)
```
## ~
## Examples
### Drive the motor for 20 seconds
Run the motor connected to port **A** continuously. Pause 20 seconds and then stop the motor.