How to reverse Bipolor motor direction with Joystick

Try this:

const int Y_CENTER = 516;  // center position of MY joystick shield
const int Y_DEADBAND = 10;  // Minimum offset required for movement

//Assigning Joystick Shield pins
int pinStickY = 1;

//Assigning Easydriver 
int pinSTEP = 13;       // Step 
int pinDIR  = 12;       // Direction
int pinMS1  = 11;       // MicroStep 1
int pinSLP  = 10;       // Sleep
int pinMS2  =  9;       // MicroStep 2
int pinENA  =  8;       // Enable

void setup() 
{
  pinMode(pinSTEP, OUTPUT);
  pinMode(pinDIR, OUTPUT);
  pinMode(pinENA, OUTPUT);
}

void loop() 
{
  int offset_Y = analogRead(pinStickY) - Y_CENTER; 

  //Set Direction
  digitalWrite(pinDIR, offset_Y < 0);  //  Change to > 0 to swap directions

  offset_Y = abs(offset_Y);

  // If joystick is far enough off center, step the motor
  if (offset_Y > Y_DEADBAND)
  {
    digitalWrite(pinENA, LOW); //Enable
    digitalWrite(pinSTEP, HIGH);
    delayMicroseconds(2);
    digitalWrite(pinSTEP, LOW);
    delayMicroseconds(1000/offset_Y);
  }
  else
  {
    digitalWrite(pinENA,HIGH);  // disable the stepper motor
  }
}