Stepper only stepping one way!?

my stepper motor (bi) is only stepping anti clockwize when the code is asking it to go 24 anti clockwize then 24 clockwize.

can anyone tell me if anything is wrong with the code?

 */

// define the pins that the motor is attached to. You can use
// any digital I/O pins.

#include <Stepper.h>

#define motorSteps 24    // change this depending on the number of steps
                           // per revolution of your motor
#define motorPin1 8
#define motorPin2 9
#define ledPin 13

// initialize of the Stepper library:
Stepper myStepper(motorSteps, motorPin1,motorPin2); 

void setup() {
  // set the motor speed at 60 RPMS:
  myStepper.setSpeed(60);

  // Initialize the Serial port:
  Serial.begin(9600);

  // set up the LED pin:
  pinMode(ledPin, OUTPUT);
  // blink the LED:
  blink(3);
}

void loop() {
  // Step forward 24 steps:
  Serial.println("Forward");
  myStepper.step(24);
  delay(500);

  // Step backward 24 steps:
  Serial.println("Backward");
  myStepper.step(-24);
  delay(500); 

}

// Blink the reset LED:
void blink(int howManyTimes) {
  int i;
  for (i=0; i< howManyTimes; i++) {
    digitalWrite(ledPin, HIGH);
    delay(200);
    digitalWrite(ledPin, LOW);
    delay(200);
  }
}

all it dose is go one 24steps one way, then twitch and go on about 23 steps in the same direction.

when i change the code to

  // Step backward 24 steps:
  Serial.println("Backward");
  myStepper.step(24);
  delay(500);

taking out the -24 and change it to just 24, I get the a 360 turn as you would expect!

My guess is that you hokked the wires to the motor up wrong.

Try to check it.