In my current program, I control the movement of my motor using the following code:
if (millis() %2 <1) digitalWrite(X_STEP_PIN, HIGH); else digitalWrite(X_STEP_PIN, LOW);
I control my motor via pyserial with a Python program. Values below 1ms (e.g. if (millis() %2 <1)) don't work. When I use the given code without controling it via Python, values below 1 ms do work and thus a higher rpm results. Why is this the case? Is there a way to accelerate my motor or is it because I control it via pyserial with a Python program?
Thank you very much in advance!