how do you connect a stepper motor?

I am totally new and I have the teensiest idea of what I'm doing :blush:.

Is there a simple way to test which leads are which on a small 5v stepper motor? My dad bought arduino from ebay and it came with a stepper motor with driver. We also bought a second motor without a driver before realizing that steppers need drivers.
I desperately need help with this!

It is so hard to find out things about arduino! :0 It is a lot easier with mindstorms.

stepper motor.JPG

140429-194637.jpg

140429-194712.jpg

Use a multimeter to measure the resistance between the wires. Assuming it's a 4-wire motor, you will find that there is a pair of wires connecting to each winding. If there's infinite resistance between a pair of wires, clearly those two wires are not on the same winding.

If it's a 6-wire motor, there are 3 wires per winding, with one being in the centre. You can tell which is in the centre by comparing the resistances between wires.

There are many posts about the 28BYJ-48 around here, its a 5-wire unipolar small
low-power stepper. The red wire is common and its normally (or exclusively) 5V
windings I believe. The driver is a multiple darlington driver chip, probably
the ULN2003 or similar, and here's a useful looking page I found by googling
"28byj-48 arduino":