I guess you problem is the "magic keyword" void loop().
It is not a magic keyword though, but a function definition, and as such it is
- in the wrong place, as inside a function you may call (execute) other functions, but you can't declare new ones.
- has a wrong name, as each function name can be declared only once.
What's wrong if you simply say:
else if (dir == SELECT)
{
stepper.step(STEPS/10);
delay(seconds);
}
... besides the fact that delay () might not be too smart, as it makes your system unresponsive during that time.