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…
All articles loaded
No more articles to load
PictoBlox Supported Boards
Extensions
Close Menu
×

Cart