Sketch not working

Hi, I am new to coding!
but have a basic understanding. I am attempting to upload the below sketch in order to control my NEMA 17 stepper motor. The code is verified and uploads with no issue. However, there is no movement from the motor.

The code is below (apologies if isn't displayed correctly, I am copying it directly from the Internet https://lastminuteengineers.com/stepper-motor-l293d-arduino-tutorial/)

I am including a few photos for reference. The battery is not connected in these photos. Also, to note the tutorial calls for a 12v battery which I do not have. I used 9v.

// Include the Arduino Stepper Library
#include <Stepper.h>

// Number of steps per output rotation
const int stepsPerRevolution = 200;

// Create Instance of Stepper library
Stepper myStepper(stepsPerRevolution, 12, 11, 10, 9);


void setup()
{
	// set the speed at 20 rpm:
	myStepper.setSpeed(20);
	// initialize the serial port:
	Serial.begin(9600);
}

void loop() 
{
	// step one revolution in one direction:
	Serial.println("clockwise");
	myStepper.step(stepsPerRevolution);
	delay(500);

	// step one revolution in the other direction:
	Serial.println("counterclockwise");
	myStepper.step(-stepsPerRevolution);
	delay(500);
}
![IMG_6322|666x500](upload://vjNnmA7MxlYTM0xoT5gHIzPRhdj.jpeg)
![IMG_6321|666x500](upload://uBSQaxQ4dTTkfmieBl5u6mWhDK6.jpeg)
![IMG_6320|666x500](upload://nWEiTMRWcpO0dgDv7nYtss8FBGj.jpeg)

I dont know how to upload photos here, in case your looking for them.

@woodworkergrl2000, your topic has been moved to a more suitable location on the forum; as you can upload, this has nothing todo with Avrdude, stk500 or Bootloader.

Looks perfect.

Just drag them from file explorer into a post; limit the size to something reasonable because not everybody has unlimited bandwidth. I think that new members have a limit on the amount of photos that they can upload, butnot sure how it exactly works.

Make sure the Arduino GND goes to the stepper driver.

Is this your setup ?

We need to see the actual wiring.

What 9v source are you using ?

Yes, that is my exact set up, I am using a battery pack with 4 double A batteries. Still working on figuring out how to upload photos. I added them to my google drive and placed the link in the original post.

What is a double A? AA? If so, that only gives 6V when in series.

Which stepper are you using? Although not my area of expertise, 6V might not be enough for a 12V stepper.

Yes AA batteries. I am using the NEMA 17 stepper motor. Amazon.com: Usongshine Nema 17 Stepper Motor 42BYGH 1.8 Degree 1.5A 42 Motor (17HS4401S) 42N.cm (60oz.in) 4-Lead with 1m Cable and Connector for DIY CNC 3D Printer (Pack of 3) : Industrial & Scientific

I'll probably need to get a 12v and try again to rule out the power issue, however I tested everything using a servo motor and it didn't work either so I am wondering if I need to wipe the UNO clean.

Attach your images HERE on this forum.

Confirm the Arduino GND pin goes to the breadboard GND.

As said, not my area of expertise. But the spec indicates that the voltage is 3.6V; 12V sounds unhealthy to me (as does 6V).

I'll correct that and see what happens also photo finally uploaded.

Appears the Arduino GND (black wire) is going to Vin ?

@LarryD You're right! That may be the issue, good catch

A 17HS4401 is a low impedance (1.5 ohm/coil) 1.7A (max) stepper.
It can't be driven by an L293D, which isn't a stepper driver anyway.
You must use a dedicated stepper driver that can provide the current needed,
like the DRV8825 (1.5A max).

You need a 12-24volt supply.
Trying to use AA batteries will be a waste of time (and money).
Leo..

So, besides the battery would you say the tutorial suggesting a L293D is inaccurate?

The L293 is a 600mA (max) brushed DC motor driver.
You can abuse it for high-impedance steppers, like the 28BYJ-48, or small 12volt steppers,
but not for the 1.5Amp stepper you have.
That one requires a true chopper-type stepper driver.
Leo..

Thanks!

Can you post a link / some links that I can read up on why 12-24V would be OK for a stepper that is rated at 3.6V? Or explain if you have the time :wink:

// Edit, I think I found the answer