i think its getting stuck in this line:
while(!digitalRead(xStopMax) && !digitalRead(yStopMin) && s<numSteps); until you press the stop button nothing will happen; it will loop on that line. "s<numSteps" will always be true since "int s=0;" right above it, unless numSteps would happen to be 0
void moveNE(int numSteps){
int s=0;
while(!digitalRead(xStopMax) && !digitalRead(yStopMin) && s<numSteps);
for(int s=0; s<numSteps; s++)
{
yAxis.step(-1);
xAxis.step(1);
}
xPos += numSteps;
yPos -= numSteps;
//check where we are
Serial.print("x position: ");
Serial.println(xPos);
Serial.print("y position: ");
Serial.println(yPos);
}
also, as far as i know that while syntax is incorrect for what you are trying to do and the for was wrong.
-the 's' int was declared separately for the for loop than the moveNE function/while loop
-the while line wouldnt work because: you had a ';' at the end so its kind of like a function and so it would only check once before the for loop(first thing i mentioned in this post).
look here:
void moveNE(int numSteps){
int s=0;
while(!digitalRead(xStopMax) && !digitalRead(yStopMin) && s<numSteps) //checks for stop switches and numStep count each step of steppers.
{
yAxis.step(-1);
xAxis.step(1);
s++;
}
xPos += numSteps;
yPos -= numSteps;
//check where we are
Serial.print("x position: ");
Serial.println(xPos);
Serial.print("y position: ");
Serial.println(yPos);
}
sorry if those explanation are bad, its kinda hard to write out.