I have been trying to use the following tutorial: https://www.instructables.com/id/Arduino-How-to-Control-a-Stepper-Motor-With-L293D-/ to control a stepper motor with an L293D motor driver. Pictures of my breadboard are attached. Unfortunately, my stepper is not working. It was working, but when I tried to change the number of steps, it stopped working. Even when I changed the number of steps back, the motor will not run. If you look in my picture of my breadboard, there are two loose red and black wires connecting into the breadboard. I think I may have accidentally crossed them, causing a short. Would this break my motor driver? Or is something else causing my motor not to function? (My code is below)
/*
Stepper Motor Control
6/4/20
*/
//include the stepper library #include <Stepper.h>
//denote which pins attach to the breadboard
int in1Pin = 12;
int in2Pin = 11;
int in3Pin = 10;
int in4Pin = 9;
// the first term in parenthesis denotes the number of steps the motor will move.
//The next four terms denote which pins are accessed in the probram
Stepper motor(512, in1Pin, in2Pin, in3Pin, in4Pin);
// line delays the serial interface until the terminal window is opened
//(I had it commented out, but can change that if necessary)
//while (!Serial);
Serial.begin(9600);
//the motor speed is set
motor.setSpeed(20);
}
void loop()
{
if (Serial.available())
{
int steps = Serial.parseInt();
motor.step(steps);
}
}
Please post a link to the datasheet for your stepper motor and tell us what stepper motor power supply you are using (volts and amps).
Please also don't attach PDFs because we can't view them without downloading them. Just include your program code in your next Reply using the code button </> and attach images as JPG or PNG files. Then make the images visible in your Reply - See this Simple Image Posting Guide
Breadboards are not intended for large currents, and the track will burn when used with motors and motor drivers. Loose connections on breadboards can also instantly destroy a motor driver, if wiggled.
You need to either solder the motor wires to the driver module, or use screw connectors if provided on the module.
Finally, never change connections when the power is applied.
In that case I don't understand what you mean by 20mA - what pin of the Arduino board (is it an Uno?) are you drawing the power from?
Please make a simple pencil drawing showing how you have everything connected and post a photo of the drawing. It will make things much easier to understand, See this Simple Image Posting Guide