I would like to ask about some coding to control DC motors using 3A Motor Driver Shield
From the user manual,
DIR = direction
EN = PWM
Hence, lets say if i want to control the speed of the motor 100 pwm CW(5s), stop(5s), 100pwm CCW(5s), how do i code?;
is this correct?
digitalWrite(en1, 100);
digitalWrite(dir, HIGH); //this is for CW direction
delay(5000);
digitalWrite(en1, 100);
digitalWrite(dir, LOW); //this is for CCW direction
delay(5000);
Can advice how to write the code for stopping the DC motor? Also, is this way of coding correct?