Connect motor () direction 1 () direction 2 () & PWM ()

connect motor

Connect motor () direction 1 () direction 2 () & PWM () block is a stack block available in actuators extension for all Arduino boards (Uno, Mega and Nano). This block initializes motor and assigns the motor its direction 1, direction 2 and PWM control pins. You cannot use other motor functions until you initialize the motor using this. This function should come at the beginning for the program.

Input Parameters

  1. Motor channel: This assigns a unique identifier for the motor which can be used in other blocks. 
    connect motor options
  2. Direction 1 Pin: This assigns the direction 1 pin for a particular motor. 
  3. Direction 2 Pin: This assigns the direction 2 pin for a particular motor. 
  4. PWM Pin: This assigns the PWM pin for a particular motor. 

Circuit Diagram

In this example, we are connecting a DC motor to Arduino using L298 motor driver IC.

Motor Driver Arduino

Example

In this program, we will control the above motor.

notor uno

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

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.
All articles loaded
No more articles to load
PictoBlox Supported Boards
Extensions