Example project doesn't work, unipolar/bipolar stepper.

So I'm a noob working my way thru the examples for a mega kit. I get to the stepper and it's not a very exciting tutorial, so I found this one instead:

It uses the same stepper (28BYJ-48) and the chip in the controller is the same except mine has an 'N' at the end: ULN2003A vs ULN2003AN

He uses a Uno, I have a Mega.

He says the motor is a bipolar:

// Set up the stepper as 4 wire bipolar on pin 4,5,6,7

The PDF for the motor says it's a unipolar and I had that one working.

The other issue is the uno vs mega. I thought I had a link that compared these, but now I can't find it. So I need to know which pins on the mega would map to what he's using on the UNO.

My advice is to start by getting the simple sketch at File > Examples > Stepper > stepper_oneRevolution working. You can find a tutorial about it here:

Once you are sure your stepper motor is working, you can move on to the more complicated project you found on the Arduino Project Hub. When you're having troubles, it's a bad idea to start with a complicated project because you have no way of knowing which part of the project isn't working. Your stepper might be perfectly fine and the project isn't working because the serial communications are not set up right.

You can use any pins on your Arduino you want, so it makes not difference whether you're using an Uno or a Mega. You just need to be sure that the pins you're using are correctly configured in the sketch.

The 28BYJ-48 is a unipolar stepper motor with 5 wires coming from it. A bipolar motor will have 4 wires. You can also get motors with 6 wires that can operate as either unipolar or bipolar.

chip in the controller is the same except mine has an 'N' at the end: ULN2003A vs ULN2003AN

When you are faced with that sort of issue you need to study the datasheets for the parts. In recent years the datasheets for all electronic components are available on the internet. My guess is that there is no significant difference between the devices - at least as far as the specifications that are important for your project are concerned.

...R

N is the designation for the DIP package.

pert:
My advice is to start by getting the simple sketch at File > Examples > Stepper > stepper_oneRevolution working. You can find a tutorial about it here:
https://www.arduino.cc/en/Tutorial/StepperOneRevolution
Once you are sure your stepper motor is working, you can move on to the more complicated project you found on the Arduino Project Hub. When you're having troubles, it's a bad idea to start with a complicated project because you have no way of knowing which part of the project isn't working. Your stepper might be perfectly fine and the project isn't working because the serial communications are not set up right.

You can use any pins on your Arduino you want, so it makes not difference whether you're using an Uno or a Mega. You just need to be sure that the pins you're using are correctly configured in the sketch.

I love your idea to try other tutorials, in fact, the prior tutorial made the stepper work, but it was very simple and did it really didn't do very good at explaining how to really control the motor like others did.

There's a problem with the tutorial that you linked to, it doesn't use the controller board that I have in my kit.

I can go back and double check the prior tutorial to make sure everything is working, but I'm wondering why the tutorial that I linked to says that motor is bipolar when it's not. I'm wondering what difference that would make in the code.

KarlJay:
in fact, the prior tutorial made the stepper work

OK, great. That's very important information for troubleshooting. My suggestion was only intended to determine whether the stepper motor is working but now I know you've already accomplished that step and don't need to do it again.

Robin2:
The 28BYJ-48 is a unipolar stepper motor with 5 wires coming from it. A bipolar motor will have 4 wires. You can also get motors with 6 wires that can operate as either unipolar or bipolar.
When you are faced with that sort of issue you need to study the datasheets for the parts. In recent years the datasheets for all electronic components are available on the internet. My guess is that there is no significant difference between the devices - at least as far as the specifications that are important for your project are concerned.

...R

How would the code in this project differ if it were a bipolar vs unipolar? Based on the comments that I'm getting, I'm thinking that's the problem.

KarlJay:
How would the code in this project differ if it were a bipolar vs unipolar? Based on the comments that I'm getting, I'm thinking that's the problem.

The type of motor will not affect the code. The type of stepper driver may. For example a ULN2003 needs 4 connections to the Arduino and the Arduino must energize the coils in the correct sequence. The DRV8825 is a common low cost driver for bipolar motors and it just needs two connections to the Arduino - step and direction. The driver looks after the business of energizing the coils in the correct sequence.

It is generally not recommended but you can drive some bipolar stepper motors with a pair of h-bridges and in that case the connections to the Arduino (and the code) would be the same as for the ULN2003.

...R