Stepper motors are a unique type of motor in terms of their precision and torque. Similar to a DC motor, a stepper motor can rotate in both directions continuously, while they can be precisely controlled similar to a servo.
In the following diagram is a 28BYJ-48 stepper motor, together with headpins that can be used to connect the motor to a breadboard:
Stepper motor theory and practice can get complex quickly! There are different forms and types of stepper motors and many variables, such as stride angles and gearing, that all need to be accounted for, plus various ways to wire and control them. We can't possibly cover all these parameters here, nor can we go into the low-level details of how stepper motors work.
Instead, we will cover the practical operation of a common and readily available stepper motor, a 28BYJ-48. Once you understand the basic principles as they apply to a ...