Stepper motor coding - hijack

stepper motor control using an arduino+cnc shield

#define EN        8  

//Direction pin
//#define X_DIR     5 
#define Y_DIR     6
//#define Z_DIR     7

//Step pin
//#define X_STP     2
#define Y_STP     3 
//#define Z_STP     4 


//A4988
int delayTime=30; //Delay between each pause (uS)
int stps=32000 ;// Steps to move


void step(boolean dir, byte dirPin, byte stepperPin, int steps)

{

  digitalWrite(dirPin, dir);

  delay(100);

  for (int i = 0; i < steps; i++) {

    digitalWrite(stepperPin, HIGH);

    delayMicroseconds(delayTime); 

    digitalWrite(stepperPin, LOW);

    delayMicroseconds(delayTime); 

  }

}

void setup(){

  //pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT);

  pinMode(Y_DIR, OUTPUT); pinMode(Y_STP, OUTPUT);

 // pinMode(Z_DIR, OUTPUT); pinMode(Z_STP, OUTPUT);

  pinMode(EN, OUTPUT);

  digitalWrite(EN, LOW);

}

void loop(){

  //step(false, X_DIR, X_STP, stps); //X, Clockwise
  step(false, Y_DIR, Y_STP, stps); //Y, Clockwise
  //step(false, Z_DIR, Z_STP, stps); //Z, Clockwise

  delay(100);

 // step(true, X_DIR, X_STP, stps); //X, Counterclockwise
  step(true, Y_DIR, Y_STP, stps); //Y, Counterclockwise
  //step(true, Z_DIR, Z_STP, stps); //X, Counterclockwise

  delay(1000);

}

when I upload this code to an Arduino Uno I got a problem with the int stps=32000(steps to move) it doesn’t take more than 32526 steps. I want to run it for more than 33000 so plz tell me, anyone, how to increase the steps

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

I am using Arduino Uno + CNC Shield to run NEMA 17 stepper motor. Motor is connected to Y axis.

When I upload the below code to the Arduino Uno I am getting a problem with the 'int stps=32000(steps to move). When I give 32000, the motor is running. But if I give more than 32000, ex.48000, the motor is not at all running

I want to run it for more than 48000. This is to increase the stepper motor movement length.

Please guide me how to increase the steps

The following is the code used:

#define EN        8  

//Direction pin
//#define X_DIR     5 
#define Y_DIR     6
//#define Z_DIR     7

//Step pin
//#define X_STP     2
#define Y_STP     3 
//#define Z_STP     4 


//A4988
int delayTime=30; //Delay between each pause (uS)
int stps=32000 ;// Steps to move   [b]Here I want to give more than 48000  steps[/b]

void step(boolean dir, byte dirPin, byte stepperPin, int steps)

{

  digitalWrite(dirPin, dir);

  delay(100);

  for (int i = 0; i < steps; i++) {

    digitalWrite(stepperPin, HIGH);

    delayMicroseconds(delayTime); 

    digitalWrite(stepperPin, LOW);

    delayMicroseconds(delayTime); 

  }

}

void setup(){

  //pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT);

  pinMode(Y_DIR, OUTPUT); pinMode(Y_STP, OUTPUT);

 // pinMode(Z_DIR, OUTPUT); pinMode(Z_STP, OUTPUT);

  pinMode(EN, OUTPUT);

  digitalWrite(EN, LOW);

}

void loop(){

  //step(false, X_DIR, X_STP, stps); //X, Clockwise
  step(false, Y_DIR, Y_STP, stps); //Y, Clockwise
  //step(false, Z_DIR, Z_STP, stps); //Z, Clockwise

  delay(100);

 // step(true, X_DIR, X_STP, stps); //X, Counterclockwise
  step(true, Y_DIR, Y_STP, stps); //Y, Counterclockwise
  //step(true, Z_DIR, Z_STP, stps); //X, Counterclockwise

  delay(1000);

}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

int stps=32000 ;// Steps to move   Here I want to give more than 48000  steps

What is the largest value that will fit in a signed int ?

HINT : is there a different data type that you could use, perhaps an unsigned one ?

@vijayvijju10, do not cross-post. Threads merged.