coulam123
Published © GPL3+

Motor Speed & Direction Control (V1)

Can be used to control the speed and direction of 3v motors.

IntermediateFull instructions provided6,070
Motor Speed & Direction Control (V1)

Things used in this project

Story

Read more

Schematics

circuit diagram

Code

code

C#
int enable2 = 9;

int in3 = 10;

int in4 = 11;

void setup()

{

pinMode(enable2, OUTPUT);

pinMode(in3, OUTPUT);

pinMode(in4, OUTPUT);

}

void loop()

{

analogWrite(enable2, 255); // Any value between 0 and 255

digitalWrite(in3, HIGH);

digitalWrite(in4, LOW);

delay(5000);

analogWrite(enable2, 255); // Any value between 0 and 255

digitalWrite(in3, LOW);

digitalWrite(in4, HIGH);

delay(5000);

}

Credits

coulam123

coulam123

0 projects • 3 followers

Comments