Momentary buttons and wifi

What the h....? What pins?
Do You want me doing my best to help You or do You want to go on on Your own? You introduce more uncertainties doing like this. I have to spend more efforts finding out what project I'm looking at.

// These four lines result in 1 step:
if (digitalRead(CCW) || digitalRead(CW))
{
digitalWrite(STEP, HIGH);
delayMicroseconds(500);
digitalWrite(STEP, LOW);
delayMicroseconds(500);
}
}

// End of Button ----------

I suggest You comment them out. They interfere with the other stepping functions, as I mentioned in #9.

Please read every detail in the replies. Some time, some day, the reply might contain the solution. What if You jump that? I will not sit here replying for good.