#include enum { STEPS_PER_REVOLUTION = 64 }; // The 28YBJ-48 stepper motor has 64 steps per revolution // // The Stepper class takes the pins in the order 1 3 2 4 // Stepper motor( STEPS_PER_REVOLUTION, P2_0, P2_2, P2_1, P2_3 ); void setup() { motor.setSpeed( 100 ); } void loop() { motor.step( 2048 ); // Clockwise one full revolution motor.step( -2048 ); // Counterclockwise }