the error-message has two numbers separated by a double-point ":"
Auto_clicker_prototype:50:3
This tells you where in your the error occurred
line 50 columm 3
and then the line is quoted
}else{
In this line is the error
You should press Ctrl-T each time before you compile new
This will autoformat your code with indentions
indent to the right for each opening curly brace "{"
indent to the left for each closing curly brace "}"
if the indention of a line is most left and some more code is following below that belongs to the same function there is a too much closing curly brace like in your case
case 3:
digitalWrite(STEPPER_PIN_1, LOW);
digitalWrite(STEPPER_PIN_2, LOW);
digitalWrite(STEPPER_PIN_3, LOW);
digitalWrite(STEPPER_PIN_4, HIGH);
break;
}
}
} else {
switch (step_number) {
the closing curly brace left of "else" is at the wrong place
it should be below all code belonging to function "onestep()"
There is already a "final closing" curly brace
case 3:
digitalWrite(STEPPER_PIN_1, LOW);
digitalWrite(STEPPER_PIN_2, LOW);
digitalWrite(STEPPER_PIN_3, LOW);
digitalWrite(STEPPER_PIN_4, HIGH);
break;
}
}
else { // <==== REMOVED closing curly brace
switch (step_number) {
you should re-edit your first posting by following this manual
best regards Stefan