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

This helped
This didn't help

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

Related Tutorials, Projects & Documentation
3D-Printed-Text-Display

DIY 3D Printed Text Display

This project will show you how to make a DIY home decor with animated text using Camshaft mechanism that can be controlled using a Smartphone.

All articles loaded
No more articles to load
PictoBlox Supported Boards
Extensions
Close Menu
×

Cart

No mo #FOMO on the coolest project-making app out there!

Check it out RIGHT NOW on Product Hunt!
Launch-Pop-Up
Dabble is trending on Product Hunt!
Check it out and let us know what your favorite feature is. 😉
x