run motor () in direction () with speed () %

The run motor () in direction () with speed () % block is a stack block which is available in the Actuators palette. The block takes the motor port, the direction of rotation (forward or reverse) and speed of rotation (between 0 to 100 %) as input from the user and rotates the motor accordingly.

Input Parameters

  1. Motor channel:
    1. evive: The motor channel can be motor channel 1 or motor channel 2.
      evive motor channel
    2. Arduino Uno, Mega, and Nano: The motor channel can be 1-4 depending on which channel has been initialized previously using connect motor () direction 1 () direction 2 () & PWM () block.  
      arduino uno motor channels
  2. Direction:
    1. Forward: This means that the motor direction 1 pin will be HIGH and motor direction pin 2 will be LOW. This will allow the motor to run in a forward direction.
    2. Backward: This means that the motor direction 1 pin will be LOW and motor direction pin 2 will be HIGH. This will allow the motor to run in a backward direction.
  3. Speed: This decides how much voltage you want to provide the motor channels which results in speed control. The allowed user input is between 0 to 100 which can be selected from the drop-down slider.
    speed dropdown
evive Notes Icon
Note: This block is available in both Upload mode and Stage mode.


  1. This script checks if the space key is pressed, then the motor 1 in forward direction with 100% speed, else the motor is stopped using () motor () block.
  2. In this example, the motor will run in full speed in direction 1 for 1 second, then it will lock for 1 second, then run in direction 2 for 1 second, then it will be free for 1 second, and repeat the process again.
    run motor example upload mode

Content is available under CC BY-SA 4.0 unless otherwise noted.

Related Tutorials, Projects & Documentation

DC Motor

Introduction evive has two inbuilt motor control units with which you can control motors with a current limit of 1A each. It uses an SN754410NE…
Attach the Motors to the Base

DC Motor Driver

evive has a dedicated pair of DC Motor Driver pin outputs, which can be used when the user has to connect a large motor which…

evive – Plug and Play: Part 1

In this tutorial, we are going to give you a hands-on experience of evive’s plug and play interface through activities for controlling a DC motor, a servo motor, understanding the inbuilt touch sensors of evive.
What is a DC Motor

What is a Dual-Shaft (DC) Motor?

Learn what is dual-shaft(DC) motor, how does DC motor work, interface it with evive using PictoBlox and what projects to make using a DC motor.
PictoBlox Supported Boards